Matt Bandy <matt.ba...@thq.com> added the comment:

Sorry, I should have been more precise.  I did use static for the variable I 
declared at file scope.  Looking at the disassembly again also reminded me of 
something I should have mentioned in the original bug report: at least when 
using Visual C++ 2008, in the release build the compiler optimizes out the 
repeated reads even with the original code, so the generated assembly with the 
local variable patch is actually identical.  I encountered the bug using the 
debug build of the interpreter, where that optimization does not occur and the 
memory is actually read three times.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to