This should not take more than 100 milliseconds in this day and age, folks.
This should not take more than 100 milliseconds in this day and age, folks.
jlpkg does this to speed up package installation: https://github.com/fredrikekre/jlpkg https://live.juliacon.org/talk/N39HSX
(All the standard libraries are baked in by default, in much the same way I think, and so can't be updated without making a new version of Julia. But they all load fast.)
Here's the instructions: https://julialang.github.io/PackageCompiler.jl/dev/examples/...
It is actually exceedingly difficult due to multiple dispatch. There's an effectively infinite number of different method signatures a function can have.
Currently, anything you want to AOT needs to go into a big monolithic sysimage with the full julia runtime. We might be able to eventually do a shared library approach that you can dynamically link to, but it'll take time.
Doing this automatically without the user opting in would make latency problems worse, not better.
> Reading about this a bit more, it almost seems like whatever PackageCompiler.jl is doing could be automated and baked into the the core julia executable with simple options/flags.
Not really, no. Fundamentally, PackageCompiler is building a monolithic executable with your desired packages baked into it. Every time you want to add a new method to compile, you need to rebuild the whole thing and you cause it to be larger on the disk and slower to start up.
Even if we could quickly cache methods, I have hundreds of Julia packages installed locally on my machine. and regularly call methods with exotic signatures. If I baked every method I ever compiled into my sysimage, it'd probably be hundreds of terabytes in size at least. You have to remember that every time I call a function f on arguments x, y, and z, I need to compile a new method for each distinct signature
f(::typeof(x), ::typeof(y), ::typeof(z))
There are more Julia function signatures that it's possible to create and compile from just Base functions and types than there are atoms in the universe.Of course, it's possible to do more caching and faster than we currently do, but I just want to emphasize that it's a hard problem.
Why is latency a concern for you? Are you running a lot of short, one-off scripts? If so, an easy solution is to just keep a julia session running and re-use it for each each script rather than constantly starting up and closing julia sessions. DaemonMode.jl [1] is a package that was recently developed that makes this workflow effortless.
Another option if you've got some production code that needs to be run over and over again is to create a custom sysimage with everything AOT compiler. PackageCompiler.jl [2] makes this workflow pretty easy nowadays.
What is your point?
Then you have a stunning misunderstanding of Python's demographics.
If it’s number of installs, then Python tinkerers would win and I agree with you.
Sounds like a hard thing to measure, but I'm sure someone has good estimates.
> Also, if we define execution of a Python line as a metric: Instagram alone will dwarf all prototypers in Python. What would be a good metric to indicate “popularity”?
Code cycles isn't really what I would mean by language use, but if we go by that metric Julia's production code also dwarfs non-production code cycles.
The Celeste project alone was running at petaflops[1] at it's peak, that is 10^15 floating point operations per second. One of the biggest targets for Julia is deploying it at scale on super-computing clusters. There are almost surely many more CPU cycles being devoted to production scale julia code than random repl code, but that's got to be true for almost any language being used at scale.
Also, counting Python line executions in production code is a little squirreley, because almost surely those lines are really just a thin wrapper around a big hunk of C code if it's a production system.
> If it’s number of installs, then Python tinkerers would win and I agree with you.
I'd also say just number lines written or projects started, the tinkerers win hands down.
[1] https://www.hpcwire.com/off-the-wire/julia-joins-petaflop-cl...