While I was testing Julia 1.4.0-rc2 for my package I notice very different results of
@time compared with Julia 1.3.0.
(I am sorry that I cannot provide an MWE for this.)
The code basically trying to run a “main” function like this one:
@time main(method="SCF") @time main(method="Emin") @time main(method="SCF") @time main(method="Emin")
From my current understanding, the first
@time should also measure compilation time and the rest should exclude the the compilation.
This is the result for Julia-1.3.1:
22.605433 seconds (68.37 M allocations: 5.628 GiB, 7.37% gc time) 0.813059 seconds (951.45 k allocations: 2.221 GiB, 7.86% gc time) 0.997460 seconds (956.30 k allocations: 2.538 GiB, 6.51% gc time) 0.830678 seconds (951.45 k allocations: 2.221 GiB, 7.38% gc time)
And this is the result for Julia-1.4.1 (the code didn’t change):
2.768451 seconds (4.49 M allocations: 1.832 GiB, 4.28% gc time) 0.637647 seconds (727.59 k allocations: 1.337 GiB, 4.56% gc time) 0.813684 seconds (731.74 k allocations: 1.653 GiB, 3.57% gc time) 0.635642 seconds (727.59 k allocations: 1.337 GiB, 3.85% gc time)
From this result, I can conclude that the timing improves for Julia 1.4.0-rc2 (Kudos for the developers ).
However, the timing for the first call is kinda surprising for me because it is very different from Julia 1.3.1 (too good to be true?). Actually by using
time command in Linux I got not too different overall timing results:
real 0m26.518s user 0m26.247s sys 0m0.256s
real 0m26.563s user 0m26.260s sys 0m0.285s
My question is: are there any changes of
@time between v1.3.1 and v1.4.0-rc2 ? Or are there any explanations for this result?