[Python-Dev] Re: Python 2.1 slower than 2.0

Jeremy Hylton jeremy@alum.mit.edu
2001年1月29日 13:04:28 -0500 (EST)


I hope another set of benchmarks isn't overkill for the list. I see
different results comparing 2.1 with 2.0 (both -O3) using pybench
0.6. 
The interesting differences I see in this benchmark that I didn't see
in MAL's are:
DictCreation +15.87%
SeoncdImport +20.29%
Other curious differences, which show up in both benchmarks, include:
SpecialClassAttribute +17.91% (private variables)
SpecialInstanceAttribute +15.34% (__methods__)
Jeremy
PYBENCH 0.6
Benchmark: py21 (rounds=10, warp=20)
Tests: per run per oper. diff *
------------------------------------------------------------------------
 BuiltinFunctionCalls: 305.05 ms 2.39 us +4.77%
 BuiltinMethodLookup: 319.65 ms 0.61 us +2.55%
 ConcatStrings: 383.70 ms 2.56 us +1.27%
 CreateInstances: 463.85 ms 11.04 us +1.96%
 CreateStringsWithConcat: 381.20 ms 1.91 us +2.39%
 DictCreation: 508.85 ms 3.39 us +15.87%
 ForLoops: 577.60 ms 57.76 us +5.65%
 IfThenElse: 443.70 ms 0.66 us +1.02%
 ListSlicing: 207.50 ms 59.29 us -4.18%
 NestedForLoops: 315.75 ms 0.90 us +3.54%
 NormalClassAttribute: 379.80 ms 0.63 us +7.39%
 NormalInstanceAttribute: 385.45 ms 0.64 us +8.04%
 PythonFunctionCalls: 400.00 ms 2.42 us +13.62%
 PythonMethodCalls: 306.25 ms 4.08 us +5.13%
 Recursion: 337.25 ms 26.98 us +19.00%
 SecondImport: 301.20 ms 12.05 us +20.29%
 SecondPackageImport: 298.20 ms 11.93 us +18.15%
 SecondSubmoduleImport: 339.15 ms 13.57 us +11.40%
 SimpleComplexArithmetic: 392.70 ms 1.79 us -10.52%
 SimpleDictManipulation: 350.40 ms 1.17 us +3.87%
 SimpleFloatArithmetic: 300.75 ms 0.55 us +2.04%
 SimpleIntFloatArithmetic: 347.95 ms 0.53 us +9.01%
 SimpleIntegerArithmetic: 356.40 ms 0.54 us +12.01%
 SimpleListManipulation: 351.85 ms 1.30 us +11.33%
 SimpleLongArithmetic: 309.00 ms 1.87 us -5.81%
 SmallLists: 584.25 ms 2.29 us +10.20%
 SmallTuples: 442.00 ms 1.84 us +10.33%
 SpecialClassAttribute: 406.50 ms 0.68 us +17.91%
 SpecialInstanceAttribute: 557.40 ms 0.93 us +15.34%
 StringSlicing: 336.45 ms 1.92 us +9.56%
 TryExcept: 650.60 ms 0.43 us +1.40%
 TryRaiseExcept: 345.95 ms 23.06 us +2.70%
 TupleSlicing: 266.35 ms 2.54 us +4.70%
------------------------------------------------------------------------
 Average round time: 14413.00 ms +7.07%
*) measured against: py20 (rounds=10, warp=20)

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