[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
> value at compile time. Any optimization based on this premise is wrong.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev