IronPython Performance Report

An automated, lightweight comparison between 'IronPython 2.6' and 'Python26'
on 10/27/2009 13:17:41.

Machine Setup

  • PC
    • Manufacturer - Dell Computer Corporation
    • Model - PowerEdge 860
    • Name - MERLIN-14
  • Software
    • Operating System - Microsoft Windows NT 6.0.6001 Service Pack 1
    • CLR Version - 2.0.50727.3603
  • CPU
    • Full Name - Intel(R) Pentium(R) D CPU 2.80GHz
    • Speed - 2800
    • Number of Cores - 2
  • RAM - 2146070528
  • Disk Drive - WDC WD1600JS-75NCB3 ATA Device


HelloWorld is a typical hello world program we've written and is used to evaluate
the startup time of a Python interpreter. Lower startup times indicate better

  • No command-line flags are passed to the Python interpreters

Best Python26 HelloWorld run (out of 5 attempts): 0.0668192 seconds
Best IronPython 2.6 HelloWorld run (out of 5 attempts): 2.1266672 seconds

PyStone 1.1

PyStone is an extremely high-level benchmark distributed with CPython. In
short, running under various implementations of Python will emit
the number of PyStones (i.e., iterations) per second that can be run on a given
machine. A higher PyStone result indicates better overall performance of a Python
interpreter. The latest copy of PyStone can be found in lib\test\
(relative to CPython installation locations).

  • By default runs 50,000 passes to determine PyStones per second. The results below were generated using this default
  • Due to site caching in the Dynamic Language Runtime, IronPython performs better with more PyStone passes than the default value

Best Python26 PyStone run (out of 5 attempts): 39163.4 PyStones/second
Best IronPython 2.6 PyStone run (out of 5 attempts): 53881.4 PyStones/second

PyBench 2.0

PyBench is a collection of low-level benchmarks distributed with CPython. Whereas
PyStone can be used to discover the overall performance of the Python interpreter,
PyBench targets specific areas (e.g., the amount of time it takes to concatenate
two strings). You can find the latest version of PyBench on CPython's Subversion
source control system (e.g.,

Please note the following:
  • Much of the platform module is broken under IPy. As such, build numbers, build dates, etc had to be faked under IPy
  • The IPy garbage collector cannot be disabled. Although this puts IPy at a disadvantage, we kept it turned off for the CPy run
  • sys.setcheckinterval does not function properly under IronPython. This is another optimization CPython gets that IronPython doesn't.
  • 1 rounds and a warp factor of 1 were used.

(this=C:\SnapTemp\IronPython 2.6, other=C:\SnapTemp\Python26)
Test min run-time this min run-time other min run-time diff avg run-time this avg run-time other avg run-time diff
BuiltinFunctionCalls: 388ms 1716ms -77.4% 388ms 1716ms -77.4%
BuiltinMethodLookup: 653ms 2058ms -68.3% 653ms 2058ms -68.3%
CompareFloats: 28ms 1081ms -97.4% 28ms 1081ms -97.4%
CompareFloatsIntegers: 356ms 1344ms -73.5% 356ms 1344ms -73.5%
CompareIntegers: 27ms 852ms -96.8% 27ms 852ms -96.8%
CompareInternedStrings: 426ms 1218ms -65.0% 426ms 1218ms -65.0%
CompareLongs: 29ms 1020ms -97.2% 29ms 1020ms -97.2%
CompareStrings: 539ms 1258ms -57.2% 539ms 1258ms -57.2%
CompareUnicode: 400ms 1103ms -63.7% 400ms 1103ms -63.7%
ComplexPythonFunctionCalls: 2180ms 2363ms -7.7% 2180ms 2363ms -7.7%
ConcatStrings: 4723ms 3023ms 56.2% 4723ms 3023ms 56.2%
ConcatUnicode: 3165ms 2829ms 11.9% 3165ms 2829ms 11.9%
CreateInstances: 761ms 2038ms -62.6% 761ms 2038ms -62.6%
CreateNewInstances: 1136ms 1521ms -25.3% 1136ms 1521ms -25.3%
CreateStringsWithConcat: 2785ms 1172ms 137.7% 2785ms 1172ms 137.7%
CreateUnicodeWithConcat: 809ms 1299ms -37.7% 809ms 1299ms -37.7%
DictCreation: 2291ms 1050ms 118.2% 2291ms 1050ms 118.2%
DictWithFloatKeys: 2023ms 2938ms -31.2% 2023ms 2938ms -31.2%
DictWithIntegerKeys: 1834ms 889ms 106.2% 1834ms 889ms 106.2%
DictWithStringKeys: 1974ms 1047ms 88.5% 1974ms 1047ms 88.5%
ForLoops: 577ms 771ms -25.2% 577ms 771ms -25.2%
IfThenElse: 291ms 876ms -66.8% 291ms 876ms -66.8%
ListSlicing: 3619ms 1487ms 143.3% 3619ms 1487ms 143.3%
NestedForLoops: 655ms 1037ms -36.8% 655ms 1037ms -36.8%
NormalClassAttribute: 2914ms 1195ms 143.9% 2914ms 1195ms 143.9%
NormalInstanceAttribute: 3725ms 1018ms 265.8% 3725ms 1018ms 265.8%
PythonFunctionCalls: 342ms 1734ms -80.3% 342ms 1734ms -80.3%
PythonMethodCalls: 3634ms 1893ms 92.0% 3634ms 1893ms 92.0%
Recursion: 558ms 2269ms -75.4% 558ms 2269ms -75.4%
SecondImport: 903ms 1249ms -27.7% 903ms 1249ms -27.7%
SecondPackageImport: 966ms 1329ms -27.3% 966ms 1329ms -27.3%
SecondSubmoduleImport: 1496ms 1698ms -11.9% 1496ms 1698ms -11.9%
SimpleComplexArithmetic: 621ms 1256ms -50.6% 621ms 1256ms -50.6%
SimpleDictManipulation: 2087ms 1157ms 80.4% 2087ms 1157ms 80.4%
SimpleFloatArithmetic: 480ms 1277ms -62.4% 480ms 1277ms -62.4%
SimpleIntFloatArithmetic: 542ms 749ms -27.6% 542ms 749ms -27.6%
SimpleIntegerArithmetic: 527ms 749ms -29.7% 527ms 749ms -29.7%
SimpleListManipulation: 1306ms 936ms 39.4% 1306ms 936ms 39.4%
SimpleLongArithmetic: 1027ms 1201ms -14.4% 1027ms 1201ms -14.4%
SmallLists: 1416ms 1648ms -14.1% 1416ms 1648ms -14.1%
SmallTuples: 855ms 1324ms -35.5% 855ms 1324ms -35.5%
SpecialClassAttribute: 3210ms 1120ms 186.5% 3210ms 1120ms 186.5%
SpecialInstanceAttribute: 3834ms 1210ms 217.0% 3834ms 1210ms 217.0%
StringMappings: 3087ms 2281ms 35.3% 3087ms 2281ms 35.3%
StringPredicates: 1346ms 1805ms -25.4% 1346ms 1805ms -25.4%
StringSlicing: 1430ms 1513ms -5.5% 1430ms 1513ms -5.5%
TryExcept: 275ms 582ms -52.7% 275ms 582ms -52.7%
TryFinally: 917ms 1760ms -47.9% 917ms 1760ms -47.9%
TryRaiseExcept: 64114ms 1102ms 5720.5% 64114ms 1102ms 5720.5%
TupleSlicing: 2028ms 1510ms 34.3% 2028ms 1510ms 34.3%
UnicodeMappings: 2090ms 949ms 120.3% 2090ms 949ms 120.3%
UnicodePredicates: 1422ms 1309ms 8.6% 1422ms 1309ms 8.6%
UnicodeSlicing: 1181ms 1713ms -31.1% 1181ms 1713ms -31.1%
WithFinally: 668ms 2243ms -70.2% 668ms 2243ms -70.2%
WithRaiseExcept: 71602ms 1677ms 4169.7% 71602ms 1677ms 4169.7%
Totals: 212276ms 79449ms 167.2% 212276ms 79449ms 167.2%


Much like PyStone, is a high-level benchmark intended to give the
Python user a single result indicating the overall "goodness" factor of a Python
interpreter. This benchmark is distributed with the PyPy interpreter, although
the original version was written in BCPL by Dr. Martin Richards at Cambridge
University. Lower "Average time per iteration" results indicate better performance.

Best average time per iteration for Python26 (out of 5 attempts): 609.9
Best average time per iteration for IronPython 2.6 (out of 5 attempts): 1396.23

Last edited Oct 27, 2009 at 8:40 PM by dfugate, version 1


No comments yet.