Open davidanthoff opened 2 years ago
I don't think the cli
piece adds much startup time. I would suggest you measure it before you try to re-implement it, it does a lot of stuff (and the stuff it does changes from version to version as we add more features)
It might be interesting implementing the cli piece in rust, especially if we are going to parse some TOML files to figure out which libraries to load.
How much potential speed gain are we talking that would make it worth to have the extra complexity (and possibility for subtle bugs due to difference between the two implementation)?
In a quick experiment, the overhead seems neglible:
tutulla:~$ hyperfine -r 25 "julia +1.10 -e 'exit()'"
Benchmark 1: julia +1.10 -e 'exit()'
Time (mean ± σ): 103.5 ms ± 2.4 ms [User: 161.1 ms, System: 478.4 ms]
Range (min … max): 101.8 ms … 113.9 ms 25 runs
versus
tutulla:~$ hyperfine -r 25 "$HOME/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/bin/julia -e 'exit()'"
Benchmark 1: /users/cip/alggeom/horn/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/bin/julia -e 'exit()'
Time (mean ± σ): 101.6 ms ± 0.9 ms [User: 165.7 ms, System: 474.4 ms]
Range (min … max): 99.6 ms … 102.7 ms 25 runs
Maybe my test is a bad one?
I think the benefit might be a bit better on Windows? My understanding is that the overhead on Windows to launch a process is larger than on Linux/Mac?
I'm not suggesting we do this anytime soon, but eventually I think the
julialauncher
binary here could take the place of https://github.com/JuliaLang/julia/tree/master/cli? That way we would speed up startup times.CC @staticfloat