Who says CPython is not well-optimized?
CPython is 25 years old -- people have been making it faster for a long time. Python 3.6, the latest release, has many performance improvements, cf. http://www.infoworld.com/article/3120952/application-develop...
Re:Grumpy: Go running Python
by trotterdylan on Wednesday January 04, 2017 @01:18PM
(#13320650)
Interestingly, achieving performance parity with CPython is one of the biggest challenges of this project. There are certain things CPython does very fast like allocating and freeing many small objects.
So, Grumpy currently isn't faster than CPython?
Notably, some of the 3.6 performance improvements were merged in from PyPy :-)
It makes sense that the official, primary and by far most popular implementation of one of the most used languages in existance is not well optimized?
(edit: I'm just being polemic about your statement here. CPython is reasonably optimized within the constraints it currently has).
It only makes sense because it's python. A language where style is part of the syntax, and readability is one of the things that many libraries focus on , the so called being "pythonic".
It makes sense that the reference implementation mirrors the same patterns than the language itself.
Someone else already posted this link: https://www.youtube.com/watch?v=qCGofLIzX6g&list=PLRdS-n5seL...
It explains why CPython can't improve on many things.
Re:Grumpy: Go running Python
by ericfrederich on Wednesday January 04, 2017 @01:27PM
(#13320740)
Please watch that first video, it's a good one. It explains how CPython essentially _is_ the spec because its internals leak into the spec when they have no business being there.
Pretty much the same is true about most other languages that have a single main implementation. This is even true, to some degree, for Java, which had competing implementations relatively early on.
A) Not well optimised.
B) Touting features before the spec/standard.
EDIT: people really dislike that I said this, and I'm having trouble finding my original citation- it was on one of the many python books I own. Most likely "Learn Python The Hard Way" but I'll dig out the exact chapter where they compare pypy to cpython and mention that because cpython is the reference implementation it values code clarity over performance optimisation.