4 ms·
> If you have actual numerical calculations that are compile-once, run-many-many-many-times, then you will see a huge performance benefit I agree, and I haven'
by Xcelerate 10y ago
> If you have actual numerical calculations that are compile-once, run-many-many-many-times, then you will see a huge performance benefit
I agree, and I haven't found anything like this in other (non-exotic) languages. I recently wrote a function using the @generated macro to produce Wigner-D matrices via the recursion relations. The function dispatches on the size of the matrix (using Type{Val{N}}) and after it compiles once for a particular value of N, all future calls are blazing fast (since the machine code is essentially just a long list of multiply and add instructions).