[Python-Dev] are NULL checks in Objects/abstract.c really needed?

Michael Hudson mwh@python.net
Thu, 13 Mar 2003 14:33:21 +0000


Michal Vitecek <fuf@mageo.cz> writes:

> Michael Hudson wrote:
>>Wow!  Can we persuade you to try CVS HEAD?
>
>  okay - i did as you said and the speed-up is only 2.1% so it's not
>  probably worth it. here come the numbers:

I didn't say "*two* point one", I said "*nought* point one"!:

  BEFORE:

$ for i in 1 2 3 4 5; do ./python- ../Lib/test/pystone.py; done 
Pystone(1.1) time for 50000 passes = 3.39
This machine benchmarks at 14749.3 pystones/second
Pystone(1.1) time for 50000 passes = 3.39
This machine benchmarks at 14749.3 pystones/second
Pystone(1.1) time for 50000 passes = 3.38
This machine benchmarks at 14792.9 pystones/second
Pystone(1.1) time for 50000 passes = 3.37
This machine benchmarks at 14836.8 pystones/second
Pystone(1.1) time for 50000 passes = 3.39
This machine benchmarks at 14749.3 pystones/second

  AFTER:

$ for i in 1 2 3 4 5; do ./python ../Lib/test/pystone.py; done
Pystone(1.1) time for 50000 passes = 3.38
This machine benchmarks at 14792.9 pystones/second
Pystone(1.1) time for 50000 passes = 3.38
This machine benchmarks at 14792.9 pystones/second
Pystone(1.1) time for 50000 passes = 3.38
This machine benchmarks at 14792.9 pystones/second
Pystone(1.1) time for 50000 passes = 3.38
This machine benchmarks at 14792.9 pystones/second
Pystone(1.1) time for 50000 passes = 3.4
This machine benchmarks at 14705.9 pystones/second

If it was a 2% gain, I'd say go for it (though Guido isn't so sure, it
seems).

What compiler/platform are you using?

Cheers,
M.

-- 
  languages shape the way we think, or don't.
                                        -- Erik Naggum, comp.lang.lisp