Compiling and leaving it alone until we decide to change?

Would be extremely nice if we can finalize our program, run it so that llvm will compile it, THEN save that compile as a standalone executable. Let the programmer decide if it needs to be compiled Every Single Time it’s started up or simply run the executable WITHOUT yet another recompile. Programmer chooses whether to use static or dynamic libraries.
Is this not already the way Julia is used???

no, because Julia is a dynamic language. However, you should checkout:

4 Likes

I did not understand the proposal there. Sorry. Are you saying make each and every standalone executable not only a monolithic piece of code but a megalithic block of code so that ALL bases are covered?
Seems to me that JIT EVERY time one starts a program is an enormous waste of user time just so we can call Julia “dynamic,” so you trade a program developers time to write the code, for each and every user’s time each and every time he wants to run that code. That will cause rapid refusal Julia at corporate level in very short order. Fielding code is nothing like writing it.

Building small static binaries is something that Julia still lacks, in effect, and PackageCompiler can be a workaround some times. It might be possible (in principle) to create binaries with which the user cannot anymore interact dynamically, to be used as type-specific libraries. I hope this can be developed in the future. For the moment the goal of PackageCompiler, if I understand, is to provide a binary for the most common uses of a library, but that will not break the interactive use and will fall back to standard jit compilation if needed.

Yet, are you experiencing some prohibitively large compilation time in some specific application? If so, it would be nice to post a specific question. There are ways to improve compilation time such that it does not, in many cases, become a problem anymore.

1 Like

Certainly Julia will cache more compiled code in the future, as well as other techniques to decrease load time. Implementing this takes time because Julia’s dynamic nature makes it tricky, but the Julia developers are well aware of the desire to improve load times and are steadily making things better with each release.

This has been heavily discussed (e.g. see Roadmap for a faster time-to-first-plot?) and it probably isn’t productive to discuss it again. Meanwhile, see this post for how Julia users typically avoid it now simply by using long-running interactive sessions: Time to first plot clarification - #2 by stillyslalom

8 Likes

So no feedback on allowing the --programmer-- to decide whether to make this particular compile “static” or (magic word?) “dynamic?”

This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.

4 Likes

If you know how to do this sort of thing, we’re always looking for new compiler developers.

3 Likes

This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.

This post was temporarily hidden by the community for possibly being off-topic, inappropriate, or spammy.