[Python-ideas] Why CPython is still behind in performance for some widely used patterns ?

Antoine Pitrou solipsis at pitrou.net
Sun Jan 28 10:47:11 EST 2018

On Sat, 27 Jan 2018 22:18:08 +0100
Pau Freixes <pfreixes at gmail.com> wrote:
> Correct me if I'm wrong, but most of you argue that the proper Zen of
> Python - can we say it mutability [1]? as Victor pointed out -  that
> allow the user have the freedom to mutate objects in runtime goes in
> the opposite direction of allowing the *compiler* to make code with
> some optimizations. Or, more specifically for the ceval -
> *interpreter*? - apply some hacks that would help to reduce the
> footprint of some operations.

Allow me to disagree.  It's true that the extremely dynamic and
flexible nature of Python makes it much harder to optimize Python code
than, say, PHP code (I'm not entirely sure about this, but still).
Still, I do think it's a collective failure that we've (*) made little
progress in interpreter optimization in the last 10-15 years, compared
to other languages.

(*) ("we" == the CPython team here; PyPy is another question)



More information about the Python-ideas mailing list