IronPython vs CPython: faster in 1.6 times?

Steve Holden steve at holdenweb.com
Tue Feb 5 22:12:20 EST 2008


Christian Heimes wrote:
> Luis M. González wrote:
>> The result is that it runs slighty faster in both, IP and CP, but
>> cpython is still faster (around 2x) than ironpython.
>> However, when using psyco simply blows everything out of the water...
> 
> CPython is very fast here because it keeps blocks of allocated integer
> objects to reduce the memory overhead. Your test shows that Python
> highly specialized and optimized memory management for ints is superior
> over IronPython's more general memory management. It also shows that
> psyco optimized the function call. It's probably inlined.
> 
> You could replace foo(i) by i*i and see how much function calls affect
> the speed.
> 
At the risk of boring you all, allow me to repeat:

"""
As always, a benchmark is only really valuable on a typical workload for
the intended application.
"""

There is no "better" and "worse" in the general case. Make rational 
decisions. Benchmark your applications, don't scheme to make an 
arbitrary benchmark run faster.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list