5 ms·
That's because PyPy has poor support for C-API exentions, which is what all the performance-oriented python packages rely on. Most people doing serious numeric
by mangecoeur 7y ago
That's because PyPy has poor support for C-API exentions, which is what all the performance-oriented python packages rely on.
Most people doing serious numeric work don't care about the speed of the Python interpreter because all the heavy lifting is done by optimized libraries like Numpy and TensorFlow.
- pjmlp 7y agoWhich will never change, because instead of improving Python, one writes C instead. I could even use them from TCL if bothered to do so, thus Python's benefits as programming language are meaningless. Tensorflow has multiple language support for example.
- ken 7y agoThen maybe the statement should have been "I believe it is basically impossible for Python to win back all that performance loss without adopting radical and jarring features like dropping the legacy C interface to Python objects." The fastest dynamic languages I see are those which have no C interface at all. How many of the performance optimizations in a modern JavaScript engine would be possible if it had to support accessing every property of every object as a C string at any point in a program? JS has exactly none of the features that comment claims would be necessary for performance.
- gnulinux 7y ago> dropping the legacy C interface to Python objects. This is nonsense. No language ever will have linear algebra or numeric implementations faster than Fortran/C implementations of BLAS, LAPACK etc. Not being able to make ffi calls makes python essentially unusable for most of its niche uses. > JS has exactly none of the features that comment claims would be necessary for performance. I don't see people doing ML, scientific computing etc in JS.
- pjmlp 7y agoC++ is pretty close to it.
- weberc2 7y agoYou're confusing "no FFI whatsoever" with "a sane FFI". Python's legacy interface is insane--it exposes virtually all details of the CPython interpreter to C extensions such that any deviation from CPython's implementation is effectively a breaking change.