Closed rohith14 closed 6 years ago
The first call to parseintperf
includes compilation. If you just repeat the two lines starting with execTime = ... ; @printf ...
you get
julia> include("test.jl")
include<test-name>:14.303056 msec
include<test-name>:1.082944 msec
timeit: 1.054681 msec
Ratio of include/timeit: 1.026798
Thanks for the quick response John. Wouldn't running with include
You're welcome. The function gets recompiled every time time you reload the code with include("test.jl")
. Doing anything else would be excessively complicated, like building a make
system into the REPL.
@rohith14, it might be best to ask these kinds of questions on Discourse; we can create a benchmarks
tag that people can subscribe to.
Hi,
Why is there a performance difference running julia code with include("") vs timeit (MACRO defined in perfutil.jl)?
For example, in the use-case below I am seeing a 13x performance difference. I run this use-case multiple times in the same Julia session, so I am not sure if it could be a first-time cost issue
julia> include("test_wrapper.jl") # Iters: 5000 include:18.649156 msec
timeit: 1.409061 msec
Ratio of include/timeit: 13.235166
test.jl