[issue10044] small int optimization

Meador Inge report at bugs.python.org
Sat Jan 1 21:24:40 CET 2011


Meador Inge <meadori at gmail.com> added the comment:

> How is the compiler supposed to know whether a and b belong to the same
> array when compiling ptr_compare?

I agree with Mark, it doesn't need to know.  However, many compilers [1,2] support whole program optimization and could in theory figure the address out using that technique.

[1] GCC -flto - http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Optimize-Options.html#Optimize-Options
[2] VC++ LTCG - http://msdn.microsoft.com/en-us/library/xbf3tbeh.aspx

----------
nosy: +meador.inge

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10044>
_______________________________________


More information about the Python-bugs-list mailing list