[Zope-dev] Re: hasattr implementation for Zope?

Tim Peters tim.peters at gmail.com
Fri May 27 15:44:02 EDT 2005


We're getting "the usual" timing results here:  it's a cross-platform,
cross-release crapshoot.  Aiming at (just) a few percent really is
worthless -- modern processors and OSes are too complex to out-think
uniformly "in the small", and even if Python variability didn't
contribute to the differences.

[Tres]
....
> But then again, the same is true for pystones:
>
> $ python ~/projects/Zope-CVS/lib/python2.3/test/pystone.py Pystone(1.1)
> time for 50000 passes = 1.39
> This machine benchmarks at 35971.2 pystones/second
> $ python ~/projects/Zope-CVS/lib/python2.3/test/pystone.py
> Pystone(1.1) time for 50000 passes = 1.15
> This machine benchmarks at 43478.3 pystones/second
> ...

My favorite in this respect will always be Win98SE.  Running pystone
after a boot gave a figure almost exactly twice as large (i.e.,
faster) than running pystone a second, third, ... time.  One way to
get back the original speed was to reboot.  The other way was to write
a little Python program that systematically allocated all of RAM,
until it died with MemoryErrror.  It didn't matter how much RAM you
had -- a dozen MB or hundreds, same thing.  This was some kind of
Satanic OS "reverse caching", I guess <0.5 wink>.


More information about the Zope-Dev mailing list