jon+python-list at unequivocal.co.uk
Mon Sep 25 17:55:49 CEST 2000
Gary Pennington <Gary.Pennington at uk.sun.com> wrote:
> Did you repeat the test a number of times to ensure disk cache was warm?
> I used strace to try and see what the differences were and found that test1
> made 25607 system calls during testing whilst test2 made 13643 calls, ie test2
> required the system to perform about half the work.
Ah. I did a ktrace and I got 963 calls to 'break' with the append, and
an amazing 5,199 calls with 'map'. Without inspecting the source I can't
begin to imagine why there is such a large difference.
> I suppose this shows that different platforms will yield different results,
> I'd stick to using map as it *SHOULD* be faster on most computers and is
> cleaner code. I'd be interested to know what environment you measured your
> tests in.
OpenBSD 2.7. It uses UVM from NetBSD nowadays I think.
More information about the Python-list