I have seen that, every time I restarted Julia, the first execution of a function in a package is somewhat slow, and the others are pretty fast. I understand that this is Julia compiling the code.
I do not understand those things about compilers and JITs and etc., but I am wondering: if the package did not change since the last execution, why this “compiled” version cannot be stored so that we do not have the overhead in the first call? I though that the
__precompile__() directive was doing this.
Do all the packages you are loading at startup have the
Precompiling will become the default I believe, in v1.0.
For now, “precompiled” packages are not stored as machine code and so still suffer from some compilation overhead when you actually execute a function. The plan is to move closer to native code (what I think you are suggesting) to avoid this in the future: see issue 27362.
Actually I was just trying to understand what is under the hood. You explained to me, now I get what the
__precompile__ directive does
Do you know if there is a milestone (1.0, 1.1 ?) in which this new compilation behavior will be implemented?
I watched… unfortunately I do not have …err how can I say… the right expertise to understand