Speed up Python by up to 5% ?

Edward K. Ream edream at tds.net
Thu Jul 25 15:13:01 EDT 2002


Thanks very much to all who replied. To summarize the responses:

1.  The trick of moving loop code into the case SET_LINENO code won't work
if line numbers are suppressed with the -O option.

2. It's not clear how much time really would be saved, but I knew that :-)
Compiling the interpreter with DYNAMIC_EXECUTION_PROFILE and DXPAIRS macros
is one way to get dynamic statistics.

3. "The current thinking is that a 10% to 15% speedup could be had by
changing ceval to use a register VM rather than a stack VM."  Obviously,
this is a major undertaking.  I eagerly await these developments.

Thanks again for all these informative responses.   I'm glad I asked.  Among
other things, this has saved me the trouble of suggesting that SET_LINENO
opcodes be "optimized."

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edream at tds.net
Leo: Literate Editor with Outlines
Leo: http://personalpages.tds.net/~edream/front.html
--------------------------------------------------------------------





More information about the Python-list mailing list