2 ms·
Julia uses modern compiler technology to achieve close to native performance. This is not just generating LLVM IR. Julia also has it's own optimization system f
by kuter 6y ago
Julia uses modern compiler technology to achieve close to native performance. This is not just generating LLVM IR.
Julia also has it's own optimization system for language specific optimizations that LLVM struggle to do (due to language specific info getting lost in conversion to LLVM IR).
Google's V8 (js interpreter) also uses modern compiler tech but I think it is not as capable as LLVM optimization vise (I don't think it is designed to be).
Python will either adapt or perish. Even if it is not julia it would be a another language.
- pansa2 6y agoV8 and the Julia compiler work in quite different ways - because they solve quite different problems. In particular, Julia’s compiler only works well on code that is "type-stable", whereas V8 has no such limitation.
- kuter 6y agoI know that V8 does some interesting stuff with it's types. Julia's creators considered supporting optimization while designing the language. Whereas the first javascript engine that even generated machine code came much later it's creation. Js has weird features like being able to set a getter function to a array index. There was a memory corruption bug in V8 that the implementation of `Array.sort` would call a getter function in the array that would change the size of the array causing a memory corruption. This was used in a exploit. Creators of V8 created a domain specific language called Torque to implement the language lol.