Speed up Python by up to 5% ?
Bernhard Herzog
bh at intevation.de
Thu Jul 25 12:03:54 EDT 2002
"Edward K. Ream" <edream at tds.net> writes:
> The byte
> code is littered with SET_LINENO opcodes. Has anyone considered moving the
> test:
>
> if (things_to_do || --tstate->ticker < 0)
> { /* handle periodic things */ } // not usually executed.
>
> out of the main loop an into the case for SET_LINENO? The code might be
> executed slightly less regularly, but would that matter?
Yes. When python is started with the -O option there are no SET_LINENO
instructions at all.
Bernhard
--
Intevation GmbH http://intevation.de/
Sketch http://sketch.sourceforge.net/
MapIt! http://www.mapit.de/
More information about the Python-list
mailing list