In article <mailman.282.1313951079.27778.python-l...@python.org>,
 Christian Heimes <li...@cheimes.de> wrote:

> Am 21.08.2011 19:27, schrieb Andreas Löscher:
> > As for using Integers, the first case (line 1319 and 1535) are true and
> > there is no difference in Code. However, Python uses a huge switch-case
> > construct to execute it's opcodes and INPLACE_ADD cames after
> > BINARY_ADD, hence the difference in speed. 
> 
> I don't think that's the reason. Modern compiles turn a switch statement
> into a jump or branch table rather than a linear search like chained
> elif statements.

This is true even for very small values of "modern".  I remember the 
Unix v6 C compiler (circa 1977) was able to do this.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to