On My Box:
Version --> Elapsed (Seconds)
Python 2.6 ...--> 1.5592293853
Python 3.1 ...--> 1.7090667948
IronPython 2.6 --> 1.18953980185
PyPy 1.4 2.5.2 --> 0.284949972692
cobra 10-18-10 --> 0.015
So PyPy is about 6x faster than Python 2.6 for this test case.
Cobra is about 20x faster than PyPy for this test case.
Forums
Cobra vs Python - speed
15 posts
• Page 2 of 2 • 1, 2
Re: Cobra vs Python - speed
On my Linux box:
Python 2.6: 0.73
Psyco 1.6: 0.017
Cobra: 0.014
So Cobra and Psyco are in the same ballpark for a very simple benchmark.
Python 2.6: 0.73
Psyco 1.6: 0.017
Cobra: 0.014
So Cobra and Psyco are in the same ballpark for a very simple benchmark.
- PixyMisa
- Posts: 2
Re: Cobra vs Python - speed
Do you sure that in first example x will not droped by optimizator? it's not used anywhere except loop.
Could you look at my suggestion and public fixed version?
Could you look at my suggestion and public fixed version?
- suliman
- Posts: 18
Re: Cobra vs Python - speed
PixyMisa wrote:On my Linux box:
Python 2.6: 0.73
Psyco 1.6: 0.017
Cobra: 0.014
So Cobra and Psyco are in the same ballpark for a very simple benchmark.
Can you use Pysco in production? The thing I like about .NET and Novell Mono is that every C# and VB programmer is flexing the machine code generator. Consequently, it's completely stable. In the Python community, the bulk of the work is done with the interpreter and only a fraction of the community uses the various alternatives (Pysco, ShedSkin, etc.)
I agree with the comment about the variable not being used.
It would also be interesting to see a more complex program like a chess engine. Something with some data structures.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Cobra vs Python - speed
I've been using Psyco in production since 2007.
It does limit you to a 32-bit architecture and Python 2.6, but for many people that's not a huge limitation. (Many of the most popular libraries are only now showing up for Python 3.)
Even so, what you say is absolutely true; .NET is far more widely used and hence far better tested than Psyco.
It does limit you to a 32-bit architecture and Python 2.6, but for many people that's not a huge limitation. (Many of the most popular libraries are only now showing up for Python 3.)
Even so, what you say is absolutely true; .NET is far more widely used and hence far better tested than Psyco.
- PixyMisa
- Posts: 2
15 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 51 guests