On 5/12/2021 1:40 PM, Mark Shannon wrote:

This is an informational PEP about a key part of our plan to improve CPython performance for 3.11 and beyond.

As always, comments and suggestions are welcome.

The claim that starts the Motivation section, "Python is widely acknowledged as slow.", has multiple problems. While some people believe, or at least claim to believe "Python is slow", other know that as stated, the latter is false. Languages do not have a speed, only implementations running code for particular applications have a speed, or a speed relative to equivalent code in another language with a different runtime.

I reason I am picking on this is that the meme 'Python is slow' is being morphed into 'Python is destroying the earth' (and should be abandoned, if not banned). Last fall, a science news journal (Nature News?) quoted a 'concerned scientist' saying just this. An internet troll repeated it last week on comp.lang.python (from where it leaked onto python-list).

It is true that Python has characteristics that make it *relatively* difficult to write interpreters that are *relatively* fast in certain applications. But the opposite is also true. The language does *not* mandate that objects, their methods, and modules be written in the language.

Hence, CPython implements builtin objects and function and some stdlib modules in C and allows 3rd party modules written in C or C++ or Fortran. I believe the first killer app for Python, in the mid 1990s, numerical computing with NumericalPython. Rather than being 'slow', CPython *enabled* people, with a few percent of added time, to access fast, heavily optimized C and Fortran libraries and do things they could not do in Fortran and that would have been much more difficult in C. My daughter's PhD thesis work is a recent example of using Python to access C libraries.

The concerned scientist mentioned above noted, more or less correctly, that numerical code, such as neuro-network code, is, say, 80x slower in pure python than in compiled C. But he did not mention that serious numerical and scientific work in Python is not done with such code.
I have seen this sort of bogus comparison before.

https://www.python.org/dev/peps/pep-0659/

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/M76T6V7UXJRARMVM2CQOMEIOOB4FQZQZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to