This is a performance regression, also for 0.3.5.  My timings for 0.3.5:

julia> @time [sumofsins1(100_000) for i in 1:100];
elapsed time: 0.446675737 seconds (320109932 bytes allocated, 21.32% gc time)

julia> @time [sumofsins2(100_000) for i in 1:100];
elapsed time: 0.115537618 seconds (896 bytes allocated)


but for 0.2.1:
julia> @time [sumofsins1(100_000) for i in 1:100];  
elapsed time: 0.347052858 seconds (320072020 bytes allocated)

julia> @time [sumofsins2(100_000) for i in 1:100];  
elapsed time: 0.008610216 seconds (896 bytes allocated)


Can you check whether an issue for this has been filed and if you can't
find one file one?

On Tue, 2015-01-27 at 07:36, Kuba Roth <kuba.r...@gmail.com> wrote:
> 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