[Python-Dev] Python Benchmarks

M.-A. Lemburg mal at egenix.com
Thu Jun 8 12:53:24 CEST 2006


Nick Coghlan wrote:
> M.-A. Lemburg wrote:
>> Still, here's the timeit.py measurement of the PythonFunctionCall
>> test (note that I've scaled down the test in terms of number
>> of rounds for timeit.py):
>>
Python 2.5 as of last night:
>> 10 loops, best of 3: 21.9 msec per loop
>> 10 loops, best of 3: 21.8 msec per loop
>> 10 loops, best of 3: 21.8 msec per loop
>> 10 loops, best of 3: 21.9 msec per loop
>> 10 loops, best of 3: 21.9 msec per loop

Python 2.4:
>> 100 loops, best of 3: 18 msec per loop
>> 100 loops, best of 3: 18.4 msec per loop
>> 100 loops, best of 3: 18.4 msec per loop
>> 100 loops, best of 3: 18.2 msec per loop
>>>> The pybench 2.0 result:
>>>> PythonFunctionCalls: 130ms 108ms +21.3% 132ms 109ms +20.9%
>>>> Looks about right, I'd say.
>> If the pybench result is still 2.5 first, then the two results are
> contradictory - your timeit results are showing Python 2.5 as being
> faster (assuming the headings are on the right blocks of tests).

<sigh> I put the headings for the timeit.py output on the
wrong blocks. Thanks for pointing this out.
Anyway, try for yourself. Just add these lines to pybench/Call.py
at the end and then run Call.py using Python 2.4 vs. 2.5:
### Test to make Fredrik happy...
if __name__ == '__main__':
 import timeit
 timeit.TestClass = PythonFunctionCalls
 timeit.main(['-s', 'test = TestClass(); test.rounds = 1000',
 'test.test()'])
-- 
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jun 08 2006)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2006年07月03日: EuroPython 2006, CERN, Switzerland 24 days left
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /