Earlier quoted context omitted.
> And there are people who claim performance doesn't matter, only correctness does. Hmm.. Performance is meaningless if the code is not correct. After all, I can make the code arbitrarily fast if I'm not going to be held to any standard of correctness: It always returns "FOOBAR". Done, and very, very fast. > Also: we chose C++, because it is fast. That is a bit naive. C++ is a standard, so how fast is a stack of pape…
C++ is only "fast" because people who care about performance use it and a lot of people who are good at compilers work on gcc/intel/llvm. If the LLVM team decided to spend 5 years making python "fast", I bet they could make it benchmark just as well as C++.
Better, perhaps, if John Walker's experiences with Javascript are anything to go by:
https://www.fourmilab.ch/fbench/fbench.html
John Walker has a program called fbench which is a floating-point benchmark built around raytracing. He's implemented it many times, in many languages, throughout the decades, beginning with implementations for the original IBM PC.
Anyway, the results are posted on the site, in terms of multiples of the speed of the C implementation, which is defined to be 1.0. The Python implementation is 2.633 (PyPy 2.2.1 (Python 2.7.3), Linux), and the Javascript implementation is 0.372 (Mozilla Firefox 55.0.2, Linux). Yes, it completes in approximately a third the speed of a C implementation compiled on full optimization (-O3) by GCC 3.2.3.
(The C++ implementation is at 0.939, GCC 5.4.0 -O3.)
Anyway, Javascript has been the target of a lot of people for a fairly long time, and, despite the fact it's a very dynamic (hard-to-optimize) language... well, the numbers speak for themselves. I have no doubt Python could be improved to a similar degree.
Downloads: https://www.fourmilab.ch/fbench/
The weblog post where he analyzes the modern Javascript numbers a bit: https://www.fourmilab.ch/fourmilog/archives/2017-10/001715.h...