I build compiled binaries for a network simulator and the process startup time really bugged me. Investigation showed that it is not really inherent to the problem. The image is mmapped fine, but then the loader walks two relocation lists and writes a pointer into nearly every page of it, and each write causes a page fault and makes a private copy of that page. On a 368 MB image that is 47k minor page faults and 88 ms of a 105 ms of init. Making the image smaller just scales the same cost down, but if you have a large application you can’t really do it anyway.
But if the image is linked into a non-PIE program, it sits at the same address at every start, so all those pointers are the same every time. The relocation is done once at build time, and the result is written back into the executable.
README
branch for master
branch for 1.13 rc
Issues and PRs are already submitted to the main Julia repository. As it turned out the core developers have been working on this anyway, so in the very near future this should be a non-issue, I think.