|
|
|
|
|
by pansa
2332 days ago
|
|
Julia is built around multiple dispatch - when making a call, the method to execute is chosen based on the run-time types of all of the arguments. Once this choice has been made, Julia compiles the method, specialised for the exact types of the arguments. So, the dispatch process and the JIT compiler are linked - both are reliant on type information every time a function is called. This specialisation is the only way the Julia JIT uses runtime type information. Unlike JavaScript JITs, Julia does not track things like the types of local variables during execution (although it may do some static inference). Therefore type annotations for local variables can improve performance. |
|