4 ms·
Couldn't the language simply cache the bytecode compiled when a package runs, and only reload if the timestamp on the compiled code is older than that on the so
by thinkpad20 13y ago
Couldn't the language simply cache the bytecode compiled when a package runs, and only reload if the timestamp on the compiled code is older than that on the source? I believe this is what python does with its .pyc files. Then it could go a step further and cache the binary generated by compiling the bytecode to machine code... seems like there's a lot of things that could be done to speed up package loading.
- KenoFischer 13y agoThis is basically what I meant. Julia doesn't really have a bytecode. There is a lower, type-inferred form of the AST as well as the llvm IR representation. However, instruction selection itself takes quite a bit of time, so if we're caching the IR, we might as well cache the generated machine code (the challenges are basically the same). As I said, it's work-in-progress (it's not that it's hard or anything, but it's a bit of work do it properly, which isn't done yet).
- carterschonwald 13y agoSo it becomes an AOT model with good jit support? Neat! I look forward to seeing how the design crystallizes.