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'.
