Le mardi 27 janvier 2015 à 10:42 -0800, Kuba Roth a écrit : > Does that mean this particular issue is rather a lack of optimization > on the LLVM side and has nothing to do with Julia's performance? > It can be easily optimized by hand. > Moving the sin(3.4) out of the loop gives me similar timings as in > John's example: 0.01002223 seconds (896 bytes allocated) > > function sumofsins3(n::Integer) > r = 0.0 > s = sin(3.4) > for i in 1:n > r += s > end > return r > end > > > I think this may be another classing example for the 'Performance > Tips'. Not really. Contrary to tips on that page, this one looks like a bug, so better fix it than document it. :-)
Regards
