Short answer: if you don't need them, don't use them.

An example where you need them:
http://docs.julialang.org/en/latest/devdocs/subarrays/

especially the section about "Index replacement," where you have to generate 
different code for different sliced dimensions (and see the implementation in 
Base).

Much of the multidimensional array code is based on generated functions. The 
Interpolations package is another (very) heavy user of the feature.

--Tim

On Monday, October 05, 2015 12:34:43 PM Matt wrote:
> Most of the time I read Julia code with generated functions, the goal is
> loop unrolling <https://en.wikipedia.org/wiki/Loop_unrolling> (included the
> main example in the documentation
> <http://julia.readthedocs.org/en/latest/manual/metaprogramming/#generated-fu
> nctions> ).
> What are other good cases to use @generated functions?

Reply via email to