5 ms·
That's not TTFP. TTFP is putting that code into a file (e.g. ttfp.jl) and running: $ time ./julia-1.9.4/bin/julia ttfp.jl 0.325806 seconds (202.80 k allocatio
by jampekka 3y ago
That's not TTFP. TTFP is putting that code into a file (e.g. ttfp.jl) and running:
$ time ./julia-1.9.4/bin/julia ttfp.jl
0.325806 seconds (202.80 k allocations: 13.208 MiB, 84.23% compilation time)
real 0m2.401s
user 0m2.357s
sys 0m0.553s
I.e. the TTFP is 2.4 seconds, not 0.33 seconds.
That said, 2.4s is huge progress (e.g. with Julia 1.6.0 it's 10 seconds for me) and acceptable for most simple plotting.
But just adding e.g. "using DynamicalSystems" brings this to 14 seconds, which is not acceptable for iterative editing. And it makes any Julia program using "DynamicalSystems" wildly impractical to use in a pipeline with other programs.
- adgjlsfhk1 3y agoAlso for the record, 1.10 rc1 brings the time down to 1.1 seconds (from 1.9 seconds in version 1.9 on my laptop). There's still more work to do, but there's been a ton of progress on this in the last year or so.
- sertbdfgbnfgsd 3y agoNo point having this conversation. These people are still repeating memes from 5 years ago. I've met one of them in the wild, it was quite eye opening.
- jampekka 3y agoYou are probably having a different conversation. This is my conversation: $ time ./julia-1.10.0-rc2/bin/julia -e "using Plots; using DynamicalSystems;" 0m5.433s This is a different conversation from julia> @time plot(x, y) 0.000465 seconds (484 allocations: 45.992 KiB) But I agree that the conversation is pointless. The TTFX will never be fixed for Julia to be used with sane workflows because the few still using Julia don't want to accept the problem. But the flamewars are fun anyhow and maybe they prevent the next Julia from making the same mistakes.
- adgjlsfhk1 3y agoI think this conversation is absolutely worth having. It's great to see that 1.10 is ~3x faster here, and there's probably another ~2 to 3x improvement or so from profiling DynamicalSystems to see where the time is going. That said, for sub second startup time with lots of packages, I highly recommend using PackageCompiler to make a custom system image which brings the using time down to roughly 0.
- jampekka 3y agoIs shaving seconds-per-package import a feasible way to get the startup time fast enough for script-type workflows? Before long you end up importing 10 packages and it will be too slow even if each package is 1s. I appreciate that the devs seem to want to do it "the right way" but that seems have taken quite a while. Wouldn't something like slow interpreter option for "glue code" be feasible? Most code doesn't need to be fast, and waiting for the "hot functions" to compile on change wouldn't be too bad. And you could still AOT for maximum speed when needed. This is essentially how Javascript JITs manage to start up so fast. Another fine "hack" for many cases would be to keep the Julia process running (like a daemon) but making sure the state is clean when a script is run on it. Something like PackageCompiler is workable, at least for the short term. Long compiles are OK if they don't have to be done all the time. I indeed manage to get < 1s TTFP with DynamicalSystems with it (last time I tried a while ago I didn't manage). The UX for creating sysimages could be nicer, but doesn't seem anything that a quick script can't fix. Maybe I'll give Julia another go in my next analysis. From what I gather there's now a new approach for caching the compilation results. I really hope it will succeed, but I'm a bit jaded from the many "Julia 1.x fixes the TTFX" news.