[Python-Dev] patch: speed up name access by up to 80%
Neal Norwitz
neal@metaslash.com
Mon, 11 Feb 2002 18:57:46 -0500
Oren Tirosh wrote:
>
> On Mon, Feb 11, 2002 at 05:26:01PM -0500, Neal Norwitz wrote:
> > Oren Tirosh wrote:
> > >
> > > Problem: Python name lookup in dictionaries is relatively slow.
> >
> > > http://www.tothink.com/python/fastnames/fastnames.patch
> >
> > I tried this patch (*) by running the regression tests:
> >
> > make && time ./python -E -tt Lib/test/regrtest.py
> >
> > All the expected tests passed and there were no failures, this is good.
> > The bad news is that it was slower. It took 42 user seconds longer
> > with the patch than without.
>
> I have tried this and got the same results for the patched and unpatched
> versions (+-1 second). The regression tests spend most of their time on
> things like threads, sockets, signals, etc that have a lot of variance
> and are not really affected by name lookup speed.
I rebuilt everything from scratch and got results similar to Oren's,
ie, roughly the same. This time I took off the test-coverage flags.
(Sorry, I must have had them off for stock, but on with the Oren's patch).
Before patch:
real 2m57.416s
user 1m12.830s
sys 0m2.580s
After patch:
real 2m56.017s
user 1m14.960s
sys 0m2.380s
I still have inlines turned off.
Neal