IronPython Performance Report

An automated, lightweight comparison between 'IronPython 2.6 for .NET 4.0' and 'Python26'
on 03/24/2010 10:02:57.

Machine Setup

  • PC
    • Manufacturer - Dell Computer Corporation
    • Model - PowerEdge 860
    • Name - MERLIN-14
  • Software
    • Operating System - Microsoft Windows NT 6.0.6002 Service Pack 2
    • CLR Version - 4.0.30319.1
  • 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.0660355 seconds
Best IronPython 2.6 for .NET 4.0 HelloWorld run (out of 5 attempts): 1.18694 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): 38872.6 PyStones/second
Best IronPython 2.6 for .NET 4.0 PyStone run (out of 5 attempts): 53213.3 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 for .NET 4.0, 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: 512ms 1722ms -70.2% 512ms 1722ms -70.2%
BuiltinMethodLookup: 793ms 2106ms -62.3% 793ms 2106ms -62.3%
CompareFloats: 12ms 1252ms -99.0% 12ms 1252ms -99.0%
CompareFloatsIntegers: 637ms 1244ms -48.8% 637ms 1244ms -48.8%
CompareIntegers: 12ms 858ms -98.6% 12ms 858ms -98.6%
CompareInternedStrings: 629ms 1212ms -48.1% 629ms 1212ms -48.1%
CompareLongs: 13ms 1042ms -98.7% 13ms 1042ms -98.7%
CompareStrings: 789ms 1390ms -43.3% 789ms 1390ms -43.3%
CompareUnicode: 603ms 1129ms -46.6% 603ms 1129ms -46.6%
ComplexPythonFunctionCalls: 2462ms 2376ms 3.6% 2462ms 2376ms 3.6%
ConcatStrings: 4551ms 3714ms 22.6% 4551ms 3714ms 22.6%
ConcatUnicode: 2774ms 2486ms 11.6% 2774ms 2486ms 11.6%
CreateInstances: 1058ms 2018ms -47.6% 1058ms 2018ms -47.6%
CreateNewInstances: 434ms 1506ms -71.1% 434ms 1506ms -71.1%
CreateStringsWithConcat: 2177ms 1141ms 90.7% 2177ms 1141ms 90.7%
CreateUnicodeWithConcat: 1011ms 1253ms -19.3% 1011ms 1253ms -19.3%
DictCreation: 2353ms 1085ms 116.9% 2353ms 1085ms 116.9%
DictWithFloatKeys: 2397ms 2964ms -19.1% 2397ms 2964ms -19.1%
DictWithIntegerKeys: 2068ms 848ms 143.9% 2068ms 848ms 143.9%
DictWithStringKeys: 2239ms 1085ms 106.3% 2239ms 1085ms 106.3%
ForLoops: 546ms 769ms -29.0% 546ms 769ms -29.0%
IfThenElse: 291ms 863ms -66.3% 291ms 863ms -66.3%
ListSlicing: 3994ms 1527ms 161.5% 3994ms 1527ms 161.5%
NestedForLoops: 624ms 1234ms -49.4% 624ms 1234ms -49.4%
NormalClassAttribute: 3273ms 1128ms 190.1% 3273ms 1128ms 190.1%
NormalInstanceAttribute: 3741ms 984ms 280.1% 3741ms 984ms 280.1%
PythonFunctionCalls: 325ms 1682ms -80.7% 325ms 1682ms -80.7%
PythonMethodCalls: 3525ms 1834ms 92.2% 3525ms 1834ms 92.2%
Recursion: 621ms 2236ms -72.2% 621ms 2236ms -72.2%
SecondImport: 951ms 1266ms -24.9% 951ms 1266ms -24.9%
SecondPackageImport: 1013ms 1309ms -22.6% 1013ms 1309ms -22.6%
SecondSubmoduleImport: 1575ms 1737ms -9.3% 1575ms 1737ms -9.3%
SimpleComplexArithmetic: 1058ms 1317ms -19.7% 1058ms 1317ms -19.7%
SimpleDictManipulation: 2243ms 1113ms 101.5% 2243ms 1113ms 101.5%
SimpleFloatArithmetic: 464ms 1270ms -63.4% 464ms 1270ms -63.4%
SimpleIntFloatArithmetic: 527ms 832ms -36.7% 527ms 832ms -36.7%
SimpleIntegerArithmetic: 526ms 755ms -30.3% 526ms 755ms -30.3%
SimpleListManipulation: 1259ms 919ms 37.0% 1259ms 919ms 37.0%
SimpleLongArithmetic: 1402ms 1191ms 17.7% 1402ms 1191ms 17.7%
SmallLists: 2602ms 1626ms 60.0% 2602ms 1626ms 60.0%
SmallTuples: 1011ms 1425ms -29.1% 1011ms 1425ms -29.1%
SpecialClassAttribute: 3382ms 1071ms 215.9% 3382ms 1071ms 215.9%
SpecialInstanceAttribute: 3850ms 1189ms 223.7% 3850ms 1189ms 223.7%
StringMappings: 3726ms 2344ms 59.0% 3726ms 2344ms 59.0%
StringPredicates: 1454ms 1802ms -19.3% 1454ms 1802ms -19.3%
StringSlicing: 1664ms 1540ms 8.0% 1664ms 1540ms 8.0%
TryExcept: 213ms 576ms -63.0% 213ms 576ms -63.0%
TryFinally: 731ms 1724ms -57.6% 731ms 1724ms -57.6%
TryRaiseExcept: 61040ms 1136ms 5275.5% 61040ms 1136ms 5275.5%
TupleSlicing: 2980ms 1517ms 96.4% 2980ms 1517ms 96.4%
UnicodeMappings: 3650ms 949ms 284.5% 3650ms 949ms 284.5%
UnicodePredicates: 1498ms 1324ms 13.1% 1498ms 1324ms 13.1%
UnicodeSlicing: 1431ms 1677ms -14.7% 1431ms 1677ms -14.7%
WithFinally: 590ms 2224ms -73.5% 590ms 2224ms -73.5%
WithRaiseExcept: 72022ms 1670ms 4213.6% 72022ms 1670ms 4213.6%
Totals: 217327ms 80193ms 171.0% 217327ms 80193ms 171.0%


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): 614.6
Best average time per iteration for IronPython 2.6 for .NET 4.0 (out of 5 attempts): 911.05

Last edited Mar 24, 2010 at 5:21 PM by dfugate, version 1


No comments yet.