[Python-Dev] tuning up...

Andrew MacIntyre andymac@bullseye.apana.org.au
Mon, 24 Feb 2003 20:38:14 +1000 (est)


On Sun, 23 Feb 2003, Guido van Rossum wrote:

> > I've just put together a binary distribution of 2.3a2 for OS/2 EMX, and
> > for the hell of it compared the pystone ratings of 2.3a2 against 2.2.2
> > on 2 different systems.
> >
> > Results:
> >                2.2.2         2.3a2        change
> > system 1       18200         21700         +19.2%
> > system 2a       5600          6975         +24.5%
> > system 2b       6600          8540         +29.4%
> >
> > (Pystone on 2.2.2 adjusted to 50000 loops, average of 3 runs)
> >
> > Hardware:
> > system 1:  Athlon 1.4GHz, 512MB (PC133), OS/2 v4.0 FP12, gcc 2.8.1 -O2
> > system 2a: Via C3 800MHz, 256MB (PC133), OS/2 v4.0 FP15, gcc 2.8.1 -O2
> > system 2b:       "      ,   "          , FreeBSD 4.7, gcc 2.95.4 -g -O3
>
> About 10% of the improvement is due to the removal of SET_LINENO
> opcodes; to remove this effect, you should compare python2.2 -O to
> python2.3.

Ok, for completeness, these are the -O times:

                2.2.2         2.3a2        change
 system 1       20000         21650          +8.2%
 system 2a       6100          6990         +14.5%
 system 2b       7170          8620         +20.2%

Your 10% claim wasn't far off!

I'm still somewhat intrigued by the difference between the systems - IIRC
the C3 CPU has only 64kB of cache, so may be some of the gains are related
to better cache locality (at least for pystone) which is less obvious on
CPUs with more cache.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac@bullseye.apana.org.au  | Snail: PO Box 370
        andymac@pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia