2011/1/3 Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com">alex.gaynor@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
No, it's singularly impossible to prove that any global load will be any given<br>
value at compile time. Any optimization based on this premise is wrong.<br>
<font color="#888888"><br>
Alex<br>
</font></blockquote><div><br></div><div>That's your opinion, but I have very different ideas.</div><div><br></div><div>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.<br>
</div><div><br></div><div>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.</div>
<div><br></div><div>Cesare</div>