CPython keeps on getting faster

George Sakkis george.sakkis at gmail.com
Mon Sep 11 00:51:55 EDT 2006


John Machin wrote:

> 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
> CPU:
>     PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
>     HumanSpeak: Intel dual-core Pentium (R) 4, nominal speed is
> 3.20Ghz
> 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
> this:
>
> DOS prompt>\ironpython\ipy
> IronPython 1.0.60816 on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> str is unicode
> True

This might also explain in part the relative slowness you noticed.
OTOH, IronPython on Mono is around 20% faster than cPython 2.4 and
2.5c1 running pystone on my laptop (~50K pystones/sec for IronPython,
~41K  pystones/sec for cPython; not significant difference between 2.4
and 2.5c1). Just adding a datapoint from a completely different
environment:

CPU: Pentium-M 730 (1.6GHz)
Memory: 512 MB
OS: Ubuntu Dapper (6.06 LTS Dapper Drake)
Python2.4: 2.4.3 (#2, Apr 27 2006, 14:43:58) [GCC 4.0.3 (Ubuntu
4.0.3-1ubuntu5)]
Python2.5: 2.5c1 (r25c1:51305, Aug 18 2006, 19:18:03) [GCC 4.0.3
(Ubuntu 4.0.3-1ubuntu5)]
IronPython: 1.0.2444 on .NET 2.0.50727.42
Mono JIT compiler version 1.1.17
        TLS:           normal
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Disabled:      none

George




More information about the Python-list mailing list