[Python-Dev] 2.6 rc1 performance results

Brett Hoerner bretthoerner at gmail.com
Sun Sep 14 02:03:40 CEST 2008


On Sat, Sep 13, 2008 at 6:05 PM, Leonardo Santagada <santagada at gmail.com> wrote:
> I would sugest compiling 2.5 and 2.6 from source, run the benchmark x times
> and take the smallest time of each test (so os and cpu scalling don't
> influence so much the benchmark) and then comparing the results.

I didn't actually run them and pick the smallest, but I did just
compile both from source to keep the environments as close as
possible.

Both compiled from source with Apple's GCC 4.0.1 on a MacBook Pro
(Intel Core 2 Duo, 4GB RAM) running OS X 10.5.4.  Minimal apps
running, plugged in to avoid obvious CPU scaling (I'm sure it drops
when you're on battery).

this = Python 2.6.0rc1
other = Python 2.5.2

Brett

---

Test                             minimum run-time        average  run-time
                                 this    other   diff    this    other   diff
-------------------------------------------------------------------------------
          BuiltinFunctionCalls:   120ms   120ms   +0.2%   121ms   121ms   +0.1%
           BuiltinMethodLookup:    92ms   109ms  -15.7%    93ms   110ms  -15.4%
                 CompareFloats:    87ms    87ms   -0.8%    87ms    88ms   -0.9%
         CompareFloatsIntegers:    91ms    83ms   +9.6%    92ms    84ms   +9.6%
               CompareIntegers:    80ms    81ms   -1.4%    80ms    81ms   -1.5%
        CompareInternedStrings:    88ms    86ms   +2.9%    89ms    87ms   +1.3%
                  CompareLongs:    84ms    78ms   +8.1%    85ms    78ms   +8.0%
                CompareStrings:    69ms    71ms   -2.4%    72ms    74ms   -2.2%
                CompareUnicode:    96ms    96ms   -0.5%    99ms    99ms   -0.2%
    ComplexPythonFunctionCalls:   128ms     0ms     n/a   129ms     0ms     n/a
                 ConcatStrings:   125ms   119ms   +5.5%   129ms   122ms   +5.1%
                 ConcatUnicode:    78ms    70ms  +11.0%    79ms    71ms  +11.9%
               CreateInstances:   136ms   135ms   +1.1%   137ms   136ms   +0.8%
            CreateNewInstances:   102ms   118ms  -13.5%   103ms   118ms  -12.9%
       CreateStringsWithConcat:   111ms   117ms   -4.6%   112ms   118ms   -4.7%
       CreateUnicodeWithConcat:    82ms   122ms  -33.0%    84ms   125ms  -33.3%
                  DictCreation:    90ms    86ms   +4.9%    91ms    91ms   +0.5%
             DictWithFloatKeys:    89ms   107ms  -17.0%    91ms   110ms  -17.8%
           DictWithIntegerKeys:    86ms    85ms   +0.7%    87ms    86ms   +1.6%
            DictWithStringKeys:    79ms    80ms   -0.5%    80ms    81ms   -1.1%
                      ForLoops:    73ms    80ms   -8.6%    75ms    81ms   -7.5%
                    IfThenElse:    77ms    81ms   -4.7%    78ms    82ms   -4.8%
                   ListSlicing:   106ms   139ms  -23.9%   107ms   142ms  -24.2%
                NestedForLoops:   103ms   101ms   +1.5%   106ms   104ms   +1.8%
          NormalClassAttribute:    99ms   118ms  -16.3%   100ms   120ms  -16.7%
       NormalInstanceAttribute:    88ms   107ms  -17.9%    88ms   107ms  -17.6%
           PythonFunctionCalls:    89ms    94ms   -5.1%    90ms    95ms   -4.9%
             PythonMethodCalls:   131ms   135ms   -3.4%   132ms   137ms   -4.0%
                     Recursion:   124ms   128ms   -3.4%   125ms   130ms   -3.7%
                  SecondImport:    92ms    84ms   +9.1%    92ms    85ms   +8.9%
           SecondPackageImport:    97ms    88ms  +10.2%    98ms    89ms   +9.2%
         SecondSubmoduleImport:   125ms   112ms  +11.8%   126ms   113ms  +11.0%
       SimpleComplexArithmetic:   100ms    98ms   +2.4%   101ms    99ms   +1.8%
        SimpleDictManipulation:    88ms    92ms   -4.7%    89ms    94ms   -4.9%
         SimpleFloatArithmetic:    89ms   106ms  -16.2%    91ms   110ms  -16.5%
      SimpleIntFloatArithmetic:    73ms    87ms  -16.1%    73ms    87ms  -16.1%
       SimpleIntegerArithmetic:    73ms    88ms  -17.5%    73ms    89ms  -17.5%
        SimpleListManipulation:    84ms    78ms   +7.3%    85ms    84ms   +1.1%
          SimpleLongArithmetic:   108ms   106ms   +1.9%   109ms   107ms   +1.8%
                    SmallLists:   119ms   120ms   -0.9%   120ms   124ms   -3.1%
                   SmallTuples:   113ms   105ms   +7.7%   115ms   106ms   +7.9%
         SpecialClassAttribute:    96ms   116ms  -17.6%    97ms   118ms  -17.8%
      SpecialInstanceAttribute:   158ms   179ms  -11.9%   159ms   181ms  -12.1%
                StringMappings:   156ms   162ms   -3.8%   156ms   162ms   -3.6%
              StringPredicates:   128ms   153ms  -16.5%   129ms   154ms  -16.3%
                 StringSlicing:   113ms   100ms  +13.1%   121ms   103ms  +17.0%
                     TryExcept:    69ms    72ms   -3.6%    69ms    72ms   -3.8%
                    TryFinally:    96ms     0ms     n/a    97ms     0ms     n/a
                TryRaiseExcept:    98ms   101ms   -2.2%    99ms   101ms   -1.8%
                  TupleSlicing:   136ms   147ms   -7.2%   141ms   148ms   -4.9%
               UnicodeMappings:   112ms    99ms  +14.1%   113ms    99ms  +14.4%
             UnicodePredicates:   105ms   110ms   -5.0%   106ms   111ms   -5.0%
             UnicodeProperties:   106ms   100ms   +5.6%   107ms   101ms   +5.4%
                UnicodeSlicing:    94ms   113ms  -16.9%    99ms   115ms  -14.7%
                   WithFinally:   139ms     0ms     n/a   140ms     0ms     n/a
               WithRaiseExcept:   120ms     0ms     n/a   121ms     0ms     n/a
-------------------------------------------------------------------------------
Totals:                          5691ms  5452ms     n/a  5766ms  5532ms     n/a

(this=2008-09-13 18:57:13, other=../Python-2.5.2/pybench2.5)


More information about the Python-Dev mailing list