[Python-Dev] Re: psyco

Tim Peters tim.one@home.com
Mon, 12 Nov 2001 16:13:39 -0500


[Armin Rigo]
> The pystone benchmark is not at all typical Python code :-)

Indeed, pystone is the least typical Python program I've ever seen <wink>:
it restricts itself to a subset of Python aping a C program aping an Ada
program, constructed in turn to do a precise number of specific operations,
where the operation counts were obtained from tracing a collection of real
Ada integer systems programs and summing how many of this-and-that happened
at runtime in aggregate.  So it literally makes no sense.  OTOH, pystone is
the best predictor of Zope performance my employer has -- if nothing else,
it does measure the speed of SET_LINENO opcodes <wink>.

> psyco still performs a x2 speed-up but this is not representative of
> possible results (it suffers from missing knowledge about integer
> multiplications and divisions as well as (more importantly) methods of
> user classes).

2X on pystone is nothing to snort at -- it's good!  Note that there is only
one class in pystone, used to emulate a C struct.  Proc1() calls its .copy()
method twice to emulate struct assignment, but that's the only use of class
methods.  By construction, there are no "killer hot spots" in pystone -- no
single trick can speed it a lot.  And speeding floats won't help it at all
<wink>.