.ji files already store IR. Shipping precompiled
.ji files is definitely of interest, but it’s not the biggest win since even after that, one still needs to do a lot of compilation at runtime. Execution of JVM/CLR is (a) not notorious for being all that snappy, and (b) to the extent that it is fast, it’s not because of the time saved by converting source to bytecode in advance. JVM/CLR execution of bytecode is fast because of the billions (trillions?) of dollars worth of developer-hours that have gone into making it fast over several decades. The runtimes do fancy tricks like executing bytecode in trace mode, keeping track of how often everything runs and what the types of things are, and then generating highly optimized versions of code that runs frequently enough and then (here’s the tricky part) doing on-stack replacement of the slow version that’s currently executing with the fast version. We could do that in Julia too, but it’s hard to implement and starting from bytecode rather than source doesn’t help much.