3 ms·
Julia is incredibly slow to compile. Far worse than C++ last time I tried. For interactive notebooks, I found it’s common to have a single line take a couple mi
by harles 5y ago
Julia is incredibly slow to compile. Far worse than C++ last time I tried. For interactive notebooks, I found it’s common to have a single line take a couple minutes to compile - it’s simply not interactive in the way Python is, despite having good runtime performance once compiled.
The deal breaker for me is that its compiler is JIT based whether you want it or not. Code will hang at runtime for multiple minutes as it compiles all the library dependencies and specializes them to the given data types.
- adgjlsfhk1 5y agoDo you have an example for minutes of compile time for a single line? Especially since 1.6 (march 2021), I haven't run into that (and I'm using Julia pretty much full-time).
- hutzlibu 5y agoSo the compile times gotten better, but still are quite slow in comparison?
- adgjlsfhk1 5y agoIn comparison to what? I've found that it's very responsive in a repl/notebook for interactive work (especially with Revise). It's not good for running short scripts, but if you have something that's doing some real work, the compilation often isn't a big deal.
- fault1 5y agoPersonally, I think interactive usage has improved quite a bit. I don't "feel" it that badly in 1.7. It was bad enough earlier in the 1.0 series that I stopped using it for a while (I used it before <1.0 as well). I think the problems were from: 1) llvm itself getting dramatically slower over time, before more focus upstream on compiler speed more recently: https://www.npopov.com/2020/05/10/Make-LLVM-fast-again.html https://www.npopov.com/2020/05/10/Make-LLVM-fast-again.html 2) different types of invalidations 3) less than ideal precompilation of packages I think all of it has been improved, and can certainly be improved further. That also includes improving the speed of its interpreter (vs the JIT), which exists but was never optimized for speed afaik.
- ElectronCharge 5y agoThis is total misinformation, sorry. Julia may, depending on your setup, be slow to initially load, but the compiler is quite fast generally. Also, there's a solution to precompile binaries with no JIT penalty... https://github.com/JuliaLang/PackageCompiler.jl https://github.com/JuliaLang/PackageCompiler.jl Enjoy!
- dunefox 5y agoThis is absolutely false in my experience. You pay for startup (100 ms on my system, I think) and for initial compilation, which has still been decently fast for me. Beyond that it's very fast.