Forums

Cobra vs Python - speed

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: Cobra vs Python - speed

Postby torial » Sat Nov 27, 2010 1:22 pm

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.
torial
 
Posts: 229
Location: IA

Re: Cobra vs Python - speed

Postby PixyMisa » Tue Feb 22, 2011 8:38 pm

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.
PixyMisa
 
Posts: 2

Re: Cobra vs Python - speed

Postby suliman » Tue May 03, 2011 1:56 am

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?
suliman
 
Posts: 18

Re: Cobra vs Python - speed

Postby Charles » Tue May 03, 2011 2:41 am

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

Postby PixyMisa » Tue May 03, 2011 2:48 am

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.
PixyMisa
 
Posts: 2

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 122 guests

cron