Ruby faster than Python???

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Ruby faster than Python???

Steve Litt-2
Hi all,

I read somewhere that Ruby is quite a bit faster than Python. Is
that true? Is it true under most circumstances, or just in special
cases?

The same article also said Ruby was somewhat slower than Perl :-)

SteveT
 
Steve Litt
http://www.troubleshooters.com
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

James Gray-7
On Dec 23, 2005, at 1:55 PM, Steve Litt wrote:

> Hi all,
>
> I read somewhere that Ruby is quite a bit faster than Python. Is
> that true? Is it true under most circumstances, or just in special
> cases?

I'm sure you could find special cases to favor either, but in general  
I would expect just the opposite.  Python's got quite a few clever  
optimizations (as I understand it), and Ruby is known to have a few  
speed issues.

> The same article also said Ruby was somewhat slower than Perl :-)

Definitely, yes.  In my experience, Perl is quite a bit zippier for  
many operations.

There's a reason we're all excited about YARV...  ;)

James Edward Gray II


Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Ryan Sobol
In reply to this post by Steve Litt-2

On Dec 23, 2005, at 2:55 PM, Steve Litt wrote:

> Hi all,
>
> I read somewhere that Ruby is quite a bit faster than Python. Is
> that true? Is it true under most circumstances, or just in special
> cases?
>
> The same article also said Ruby was somewhat slower than Perl :-)
>
> SteveT
>
> Steve Litt
> http://www.troubleshooters.com
> [hidden email]
>

Someone posted this the other day.

http://mail.python.org/pipermail/python-list/2005-October/305692.html

Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Antonio Cangiano
In reply to this post by Steve Litt-2
Steve Litt wrote:
> Hi all,
>
> I read somewhere that Ruby is quite a bit faster than Python. Is
> that true? Is it true under most circumstances, or just in special
> cases?

No. Generally speaking, Python is faster than Ruby.

> The same article also said Ruby was somewhat slower than Perl :-)

True.

If you encounter performance issues, the profiler is your friend! :-)
The bottle-neck is often the programmer, not the interpreter :-P
Furthermore, Ruby will be significantly faster with YARV (Yet Another
Ruby VM) http://www.atdot.net/yarv/

Cheers,
--
Antonio Cangiano
My Ruby blog: http://www.antoniocangiano.com

Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Eric Jacoboni
Antonio Cangiano <[hidden email]> writes:

> Furthermore, Ruby will be significantly faster with YARV (Yet Another
> Ruby VM) http://www.atdot.net/yarv/

Current version (0.3.3) of YARV shows already a big boost on execution
speed.

--
Eric Jacoboni, ne il y a 1438812919 secondes

Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Antonio Cangiano
Eric Jacoboni wrote:
> Antonio Cangiano <[hidden email]> writes:
>
>
>>Furthermore, Ruby will be significantly faster with YARV (Yet Another
>>Ruby VM) http://www.atdot.net/yarv/
>
>
> Current version (0.3.3) of YARV shows already a big boost on execution
> speed.


Definetely, Eric. I used the future tense "will be" to indicate the time
when Ruby implementation will be based on YARV instead of the current
interpreter.

Cheers,
--
Antonio Cangiano
My Ruby blog: http://www.antoniocangiano.com

Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Isaac Gouy-2
In reply to this post by Steve Litt-2

Steve Litt wrote:

> Hi all,
>
> I read somewhere that Ruby is quite a bit faster than Python. Is
> that true? Is it true under most circumstances, or just in special
> cases?
>
> The same article also said Ruby was somewhat slower than Perl :-)
>
> SteveT
>
> Steve Litt
> http://www.troubleshooters.com
> [hidden email]

http://www.rubygarden.org/ruby?BenchMarks


Reply | Threaded
Open this post in threaded view
|

Re: Ruby faster than Python???

Christian Neukirchen
In reply to this post by Eric Jacoboni
Eric Jacoboni <[hidden email]> writes:

> Antonio Cangiano <[hidden email]> writes:
>
>> Furthermore, Ruby will be significantly faster with YARV (Yet Another
>> Ruby VM) http://www.atdot.net/yarv/
>
> Current version (0.3.3) of YARV shows already a big boost on execution
> speed.

If it can run your code, that is...

--
Christian Neukirchen  <[hidden email]>  http://chneukirchen.org