relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

Laurent laurent.payot at gmail.com
Sun Aug 21 15:53:04 EDT 2011


> With 64 bit 3.2.2 on my Win 7 Pentium, the difference was 4% and with 
> floats (0.0 and 1.0), 6%

For floats it is understandable. But for integers, seriously, 4% is a lot. I would never have thought an interpreter would have differences like this in syntax for something as fundamental as adding 1.



More information about the Python-list mailing list