News for hackers. Stuff that matters.
Re:Python JITs are coming by enriquto on Tuesday August 23, 2016 @05:56PM (#12348062)
You want to process (typically, with simple arithmetical operations) huge arrays of numbers. Imagine that you want to sum two arrays of 800 MB of floating point numbers each. This is one step inside the loop of your algorithm.

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.

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.

Re:Python JITs are coming by enriquto on Tuesday August 23, 2016 @07:52PM (#12348708)
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).
Re:Python JITs are coming by dagss on Wednesday August 24, 2016 @02:41AM (#12350182)
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.