Type annotation make JIT compile faster?

I have a very simple question about Julia itself.
Does type annotation for function make JIT compile faster?

In other words, Should I add type annotations as much as possible for good JIT compile performance?


No. You do not generally need type annotations on function arguments (except to control behavior via dispatch), nor do you need type annotations in local scope. The place that type annotations are essential for performance is on locations: the fields of structs and the element types of arrays and other data structures.


Oh, Thanks!!

1 Like