Can Just-In-Time also be made to be Just-Once

hopefully for Julia compiler?


Can you be more specific?

(Also, AFAIK Julia’s compiler is AOT).

What I hope is that after the first run of a script when it is compiled, somehow (with the compiled image saved?), it does not need to be compiled again during later runs (when the script has not been changed).

Yes, that would be full-blown compile caching. The devs have said that latency due to compilation will be one of the major priorities before 2.0. I’m not sure whether they intend to have full-blown compile caching in that time frame. As far as I know compiler performance was a low priority before 1.0, so I don’t know if there are plans on working on the compiler performance itself before that happens.

Indeed, the latency can get pretty damn annoying as things are right now. For anyone who is not aware, you can use Revise.jl to mitigate this problem. In some cases it might also be worth experimenting with PackageCompiler.jl.