[Python-Dev] Possible optimization for LOAD_FAST ?

Barry Warsaw barry at python.org
Tue Jan 4 17:54:35 CET 2011


On Jan 04, 2011, at 10:21 AM, Alex Gaynor wrote:

>Ugh, I can't be the only one who finds these special cases to be a little
>nasty?
>
>Special cases aren't special enough to break the rules.

Yeah, I agree.  Still it would be interesting to see what kind of performance
improvement this would result in.  That seems to be the only way to decide
whether the cost is worth the benefit.

Outside of testing, I do agree that most of the builtins could be pretty
safely optimized (even open()).  There needs to be a way to stop all
optimizations for testing purposes.  Perhaps a sys variable, plus command line
option and/or environment variable?

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110104/eb77b605/attachment.pgp>


More information about the Python-Dev mailing list