[Python-Dev] Possible optimization for LOAD_FAST ?

Cesare Di Mauro cesare.di.mauro at gmail.com
Mon Jan 3 07:52:58 CET 2011


2011/1/3 Alex Gaynor <alex.gaynor at gmail.com>

> No, it's singularly impossible to prove that any global load will be any
> given
> value at compile time.  Any optimization based on this premise is wrong.
>
> Alex
>

That's your opinion, but I have very different ideas.

Of course we can't leave the problem only on the compiler shoulders, but I
think that can be ways to threat builtins as "static" variables, and globals
like local (fast) variables too, taking into account changes on the
builtins' and modules dictionaries.

But it doesn't make sense to invest time in these things: JITs are becoming
a good alternative, and may be they will be ready soon to take the CPython
place as the "mainstream" implementation.

Cesare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110103/d666144d/attachment.html>


More information about the Python-Dev mailing list