by pjmlp · 3y ago · 0 comments
So you don't have to rewrite anything. Nowadays ML stuff is usually about matrix multiplications in its core so Python with NumPy (or a Cuda library) also delivers good enough performance. The native code is already there, just call it. You don't have to write it.
- Requires manual type annotations to achieve remotely reasonable performance
- Does no interesting optimisations around method dispatch
- Chokes on code which reassigns variables
- Doesn't model memory (sroa, store forwarding, alias analysis, concurrency...)
- Doesn't do code motion
- Has a decent, but not particularly good gc
Hotspot hits on all of these points.
It's true that if you hand-hold the compiler, you can get fairly reasonable machine code out of it, same as you can do with some c compilers these days. But it's 80s technology and it shows.
Secondly, we are speaking about dynamic languages over here, that keep using C and Fortran.