
This report <https://www.theregister.com/2021/05/06/the_quest_for_faster_python/> on Facebook’s new “Cinder” project for speeding up Python code also mentions some other existing alternatives for doing the same. Python is commonly considered slow, yet note this one interesting comparison that was done with JavaScript: In May 2020 AI specialists DLabs tested JavaScript versus Python performance for machine learning. For JavaScript Node 12.16.1 was used, and for Python 3.7.6. The results seem surprising: although JavaScript benefits from an excellent JIT in Node (which uses the V8 engine as used by Google Chrome), Python easily outperformed it. "The learnings from the tests I ran are stark. JavaScript couldn’t get close to Python’s tasks — across the board. JavaScript’s computational performance is still much better than Python’s. However, the maturity of the libraries — which often have underlying modules written in C — means that operations on large datasets can offer so much more than sheer computational power," said developer Krzysztof Miśtal. Which is what Guido van Rossum has long advised: write performance-critical parts as extension modules in C.