[Python-Dev] Time for the yearly list.append() panic
Tim Peters
tim.one@home.com
Sat, 26 May 2001 00:05:40 -0400
[Mark Favas]
> [Tim wants to know whether his patch to listobject.c slows anything down
> on anyone's "oddball box"...]
>
> While in no way admitting that mine is an oddball box <wink>,
Heh -- of course not. I had more in mind obscure OSes like Linux <wink>.
> 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>.
Get anywhere identifying why your other app is 20% slower (blast from the
past)?