Le vendredi 25 septembre 2015 02:41:32 UTC+2, Ben Ward a écrit :
>
> As an update: We have tested fetching annotations without trying to
> enforce type, and then another in which we don't. I don't understand why,
> but the one in which we don't enforce type, is faster, it is also puzzling
> for me as the one where we don't enforce type allocates memory, and yet is
> still faster
>
>
The type Any is fine. Let the compiler do its job. You want to specify the
type when working with arrays of floats to prevent boxing. Apart from that,
I don't think I have ever seen a significant speed improvement from typing
everything. On the other hand, I have sometimes seen a speed decrease when
typing recursive data structures. My two cents: don't bother with the types
unless this has to do with iterating on floats. Use profiling if there is a
speed issue.