[Python-3000] Will Py3K be friendlier to optimization opportunities?

skip at pobox.com skip at pobox.com
Wed Aug 29 19:36:43 CEST 2007


At various times in the past Python's highly dynamic nature has gotten in
the way of various optimizations (consider optimizing access to globals
which a number of us have taken cracks at).  I believe Guido has said on
more than one occasion that he could see Python becoming a bit less dynamic
to allow some of these sorts of optimizations (I hope I'm not putting words
into your virtual mouth, Guido).  Another thing that pops up from
time-to-time is the GIL and its impact on multithreaded applications.

Is Python 3 likely to change in any way so as to make future performance
optimization work more fruitful?  I realize that it may be more reasonable
to expect extreme performance gains to come from Python-like systems like
Pyrex or ShedSkin, but it might still be worthwhile to consider what might
be possible after 3.0a1 is released.

Based on the little reading I've done in the PEPs, the changes I've seen
that lean in this direction are:

* from ... import * is no longer supported at function scope
* None, True and False become keywords
* optional function annotations (PEP 3107)

I'm sure there must be other changes which, while not strictly done to
support further optimization, will allow more to be done in some areas.

Is there more than that?

Skip



More information about the Python-3000 mailing list