[Python-Dev] Time for the yearly list.append() panic
Mark Favas
m.favas@per.dem.csiro.au
Sat, 26 May 2001 16:30:29 +0800
[Tim tells Mark that his observations reflect more Brownian motion
(pseudo!) than reality...]
> [Mark Favas]
> > it being a Tru64 Unix alpha processor machine, I do see a slowdown
> > after applying the patch (measured on the test suite and on pystone).
> > However, it's only of the order of 0.5 to 1%.
>
> Now that's very odd, since Alpha has about the slowest integer divsion on
> Earth, and every list append was doing an int div before the patch but not
> after.
>
> I'm afraid that timing the test suite before and after is a red herring, as
> several of the expensive tests have (pseudo)random components and can do an
> amount of work that varies depending on system time at the time random.py is
> first imported.
>
> pystone is even odder: the relevant code in listobject.c is never executed
> during pystone! I suspected that because pystone is an old synthetic Ada
> benchmark simulating a pile of integer systems programs, so pystone is
> unique among Python programs in not exercising any of Python's useful
> features <wink> -- a breakpoint in the debugger just now confirmed it (never
> did a list resize after compilation finished).
>
> So I'm pretty sure that after I check it in, you'll see a speedup instead
> <wink>.
OK <grin>: this time, instead of making unwarranted assumptions about
test suites and pystones <wink>, I wrote and ran a test that I _think_
should exercise the code (at least, it does lots of list.append()s),
and, yes, the newly checked-in code's about 3-4% faster compared with
the original version of, well, days ago.
>
> Get anywhere identifying why your other app is 20% slower (blast from the
> past)?
No, not yet. The profiling results at first eyeball seemed hard to match
up, so I put it off for a rainy weekend. And Perth's drought has just
broken... Will attempt to make sense of it. Interesting that Marc Andre
seemed to get a somewhat similar slowdown between 1.52 and 2.0.
--
Mark Favas - m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA