>Short answer: if you don't need them, don't use them. @tim holy is right! This should be the first thing to know about @generated functions. They make quite a few things difficult for the compiler and probably won't exist very long in their current form.
But they're great for prototyping optimizations, which should rather be left to the compiler in the future. They're also useful when you want to inline computations at first call into the frechly compiled function. Am Montag, 5. Oktober 2015 21:34:43 UTC+2 schrieb Matt: > > 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-functions> > ). > What are other good cases to use @generated functions? >
