CPython keeps on getting faster

John Machin sjmachin at lexicon.net
Sun Sep 10 23:34:50 EDT 2006

Here are some data points that illustrate the improvement in speed
since 2.1 for one (probably atypical) application: rummaging through a
120MB Microsoft Excel spreadsheet file using the xlrd package.

The time shown is the number of seconds required to open the file and
parse out all data content -- heavy usage of struct.unpack(). The only
code that is conditional on the Python version is where it defines
things to stop 2.1 barfing, like a dummy class called "object" .

2.1.3: 117
2.2.3:  95
2.3.5:  75
2.4.3:  62
2.5c1:  49

Other info:
xlrd version: 0.6.0a2 -- coming soon to a cheese shop near you :-)
OS: Windows XP SP2
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
    HumanSpeak: Intel dual-core Pentium (R) 4, nominal speed is
Memory: 1 Gb (enough to avoid swapping)

Well done, core devs!

FWIW, IronPython 1.0.60816 does it in 132 seconds. For avoidance of
doubt (and flak!) I'd like to clarify that IMHO the mere existence of
IronPython merits plaudits. I do however trust that it will similarly
become faster over time. And nobody mentioned the possibility of an
188% increase in memory usage, which may well be partially explained by

DOS prompt>\ironpython\ipy
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> str is unicode


More information about the Python-list mailing list