3 ms·
Yes, it's JIT compiled. And my (very crude) understanding is that the stronger type system makes this much easier than in Python. The compiled version of any f
by improbable22 8y ago
Yes, it's JIT compiled.
And my (very crude) understanding is that the stronger type system makes this much easier than in Python. The compiled version of any function is specific to the types of its inputs, and thus need not contain any further checks: simple functions often end up with literally the same assembly as C would produce.
- skolemtotem 8y agoIf anyone wants to do more research on this, the keyword is "monomorphization".
- dnautics 8y agoIt's "extremely lazy ahead of time compiled", is one way I've described the compilation model, since you're basically never executing code in an interpreted fashion (usually jits let you do either). Also, typically jit's choice of when to but may be non-deterministic, or deterministic but difficult to understand. When Julia chooses to compile is pretty easy to understand
- ScottPJones 8y agoI believe though that there is some work being done on actually directly interpreting the AST, in cases where going through all the work of generating LLVM IR and compiling that to native code is unnecessary, particularly when it is code that is only run once when a package is compiled the first time.