Because it takes some time to display the image (@time will appear way before image actually shows up), I chose to do put the timing like this which is a bit hacky – you need to hit restart kernel and run all cells.
I noticed in Jupyter there’s delay between cell calls, fixed that, still ~4s.
The thing is, @time does NOT reflect the time it takes for you to see the plot, you can try this in Jupyter notebook. when @time spits out the answer, you haven’t seen the plot yet.
julia> @time using GR
0.194347 seconds (159.49 k allocations: 10.088 MiB)
julia> @time histogram(randn(10000), nbins=50)
3.863596 seconds (10.47 M allocations: 524.561 MiB, 6.45% gc time)
julia> versioninfo()
Julia Version 1.1.1
Commit 55e36cc308 (2019-05-16 04:10 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 7