CPython keeps on getting faster

Discussion in 'Python' started by John Machin, Sep 11, 2006.

  1. John Machin

    John Machin Guest

    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

    Cheers,
    John
    John Machin, Sep 11, 2006
    #1
    1. Advertising

  2. 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
    George Sakkis, Sep 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    5
    Views:
    1,465
    Nathan Sokalski
    Oct 3, 2005
  2. Replies:
    2
    Views:
    267
  3. Nicola Larosa (tekNico)

    Is Ruby 1.9 going to be faster than CPython?

    Nicola Larosa (tekNico), Nov 28, 2007, in forum: Python
    Replies:
    0
    Views:
    284
    Nicola Larosa (tekNico)
    Nov 28, 2007
  4. Jack
    Replies:
    3
    Views:
    390
    Ross Ridge
    Dec 20, 2007
  5. dmitrey
    Replies:
    25
    Views:
    739
    Fuzzyman
    Feb 12, 2008
Loading...

Share This Page