4 ms·
This is simply not true. I have a 3 year old mac, and this is doing simple arithmetic (including starting and exiting Julia). 0.14 seconds user time. $ time
by ViralBShah 6y ago
This is simply not true. I have a 3 year old mac, and this is doing simple arithmetic (including starting and exiting Julia). 0.14 seconds user time.
$ time ~/Desktop/Julia_Releases/Julia-1.4.app/Contents/Resources/julia/bin/julia -E "1+1"
2
~/Desktop/Julia_Releases/Julia-1.4.app/Contents/Resources/julia/bin/julia -E 0.14s user 0.08s system 65% cpu 0.342 total
In about 0.5 seconds, I can actually do something non-trivial that actually needs non-trivial compilation - like summing the sin of a million random numbers
$ time ~/Desktop/Julia_Releases/Julia-1.4.app/Contents/Resources/julia/bin/julia -E "sum(sin.(rand(1000000)))"
460165.3756259715
~/Desktop/Julia_Releases/Julia-1.4.app/Contents/Resources/julia/bin/julia -E 0.59s user 0.13s system 93% cpu 0.769 total
- dunefox 6y agoBy half a second I obviously didn't mean 0.5 seconds but rather a very short duration that I didn't bother to measure. Edit: Now I bothered to measure. You were saying? ~ time julia -E "1+1" 2 julia -E "1+1" 0,59s user 0,14s system 153% cpu 0,476 total ~ time julia -E "sum(sin.(rand(1000000)))" 459807.21199623536 julia -E "sum(sin.(rand(1000000)))" 1,01s user 0,17s system 125% cpu 0,948 total
- ViralBShah 6y agoWhich version of Julia are you using? My main point was that while half a second (~0.5s) is perceptible startup time, ~0.1s is not. Is it a much older system than mine? I have a 2.3GHz Core i5 from about 2017.
- celrod 6y agoI load a few packages in my startup. `--startup=no` makes the difference between about 0.12s and 0.5s on the 1+1 example for me. This doesn't really bother me, but maybe I should try PackageCompiler or adding `using OhMyREPL, Revise, Cthulhu, BenchmarkTools` to a userimg.jl for when I build from source.
- dunefox 6y agoThe only think I'm loading at startup is OhMyREPL.