Hi there,
Recently I run into this very interesting post:
http://www.johnmyleswhite.com/notebook/2013/12/06/writing-type-stable-code-in-julia/

Surprisingly, when tested both examples against the latest 0.4 build - the 
speed difference of the type-stable version is only 2-3 times faster then 
unstable one.
I wonder what is the source of such a huge disparity and what version of 
Julia was used?

My timings:
unstable: 0.425013212 seconds (305 MB allocated, 7.56% gc time in 14 pauses 
with 0 full sweep)
stable: 0.14287404 seconds (896 bytes allocated)

John's:
unstable: 0.412261722 seconds (320002496 bytes allocated) 
stable: 0.008509995 seconds (896 bytes allocated)  

Thanks,
kuba

Reply via email to