Re:Python JITs are coming
by kevin_thibedeau on Tuesday August 23, 2016 @07:24PM
(#12348592)
> You cannot do that at all in Python. Well, you can, but it will be orders of magnitude slower.
NumPy + Cython would beg to differ.
Of course, but not natively. Try doing that in plain python using a list of 8000 lists of 8000 lists of 3 numbers (e.g. a mid-resolution microscopy image).
NumPy is about one order of magnitude slower in very many situations. Cython is in some ways a reimplementation of Fortran in places -- I mean, you can consider it a better alternative but have to use features that are not in Python.
Personally I gave up writing numerical code in Cython and instead wrote it in Fortran and merely wrapped it with Cython...
But yes, being 2x-10x slower is something one can live with for productivity, vs sometimes 1000x slower of Python.
You can do that natively in C, and the result is very fast. You can do that natively in Fortran. And in Matlab, etc.
You cannot do that at all in Python. Well, you can, but it will be orders of magnitude slower.