[Python-Dev] Python Benchmarks

M.-A. Lemburg mal at egenix.com
Wed Jun 7 23:11:14 CEST 2006

Some more interesting results from comparing Python 2.4 (other) against
the current SVN snapshot (this):

Testnames                        minimum run-time        average  run-time
                                 this    other   diff    this    other
           BuiltinMethodLookup:   142ms   124ms  +14.5%   151ms   134ms
                 ConcatUnicode:    95ms   120ms  -20.7%   104ms   131ms
               CreateInstances:   102ms    92ms  +10.0%   107ms    96ms
       CreateUnicodeWithConcat:    98ms   122ms  -19.2%   103ms   129ms
             DictWithFloatKeys:   128ms   149ms  -14.1%   133ms   177ms
                NestedForLoops:   141ms   126ms  +11.8%   144ms   128ms
           PythonFunctionCalls:   131ms   108ms  +21.5%   133ms   109ms
                  SecondImport:   135ms   114ms  +18.3%   140ms   117ms
           SecondPackageImport:   136ms   122ms  +11.2%   144ms   124ms
         SecondSubmoduleImport:   166ms   146ms  +13.5%   171ms   148ms
       SimpleComplexArithmetic:   106ms   131ms  -19.1%   112ms   133ms
              StringPredicates:   109ms    96ms  +13.6%   114ms    99ms
                TryRaiseExcept:   119ms   137ms  -13.3%   122ms   140ms
               UnicodeMappings:   140ms   157ms  -10.8%   141ms   160ms
             UnicodePredicates:   111ms    98ms  +12.9%   115ms   100ms
                UnicodeSlicing:   101ms   114ms  -11.2%   108ms   116ms

It appears as if the import mechanism took a hit between the

The NFS sprint results are also visible.

A little disturbing is the slow-down for Python function calls
and the built-in method lookup. Did anything change in these parts
of the interpreter ?

This is the machine I used for running the pybench:
    Timer:  time.time
    Machine Details:
       Platform ID:  Linux-2.6.8-24.19-default-x86_64-with-SuSE-9.2-x86-64
       Processor:    x86_64

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jun 07 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/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Python-Dev mailing list