Speed up Python by up to 5% ?

Neil Schemenauer nas at python.ca
Thu Jul 25 13:03:55 EDT 2002


Pete Shinners wrote:
> i was always under the impression that some sort of "layered" switch 
> statement could speed up execution.

Probably not.  I think a smart compiler generates a "computed goto"
based on the opcode.  In that case, switching twice would slow things
down.

  Neil




More information about the Python-list mailing list