# Ruby faster than Python?

**URL:** <https://www.ruby-forum.com/t/ruby-faster-than-python/54237>\
**Category:** Ruby\
**Created:** [December 23, 2005, 8:57pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237 "2005-12-23T20:57:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 8:57pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/1 "2005-12-23T20:57:45Z")

</div>

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 L.

> **[Troubleshooters.Com](http://www.troubleshooters.com)**
>
> The process and mindset of troubleshooting.

removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 9:06pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/2 "2005-12-23T21:06:47Z")

</div>

On Dec 23, 2005, at 1:55 PM, Steve L. 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 G. II

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 9:09pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/3 "2005-12-23T21:09:54Z")

</div>

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

> Steve L.  
> [http://www.troubleshooters.com](http://www.troubleshooters.com)  
> removed\_email\_address@domain.invalid

Someone posted this the other day.

[http://mail.python.org/pipermail/python-list/2005-October/305692.html](http://mail.python.org/pipermail/python-list/2005-October/305692.html)

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 9:25pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/4 "2005-12-23T21:25:01Z")

</div>

Steve L. 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 😛  
Furthermore, Ruby will be significantly faster with YARV (Yet Another  
Ruby VM) [YARV: Yet Another Ruby VM](http://www.atdot.net/yarv/)

Cheers,

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 10:19pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/5 "2005-12-23T22:19:09Z")

</div>

Antonio C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Furthermore, Ruby will be significantly faster with YARV (Yet Another  
> Ruby VM) [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.

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 11:19pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/6 "2005-12-23T23:19:20Z")

</div>

Eric J. wrote:

> Antonio C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:
> 
> > Furthermore, Ruby will be significantly faster with YARV (Yet Another  
> > Ruby VM) [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,

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 24, 2005, 2:02pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/7 "2005-12-24T14:02:45Z")

</div>

Eric J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Antonio C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:
> 
> > Furthermore, Ruby will be significantly faster with YARV (Yet Another  
> > Ruby VM) [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…

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 23, 2005, 11:49pm UTC](https://www.ruby-forum.com/t/ruby-faster-than-python/54237/8 "2005-12-23T23:49:27Z")

</div>

Steve L. wrote:

> Steve L.  
> [http://www.troubleshooters.com](http://www.troubleshooters.com)  
> removed\_email\_address@domain.invalid

> **[WebMD - Better information. Better health.](https://www.webmd.com/?BenchMarks)**
>
> The leading source for trustworthy and timely health and medical news and information. Providing credible health information, supportive community, and educational services by blending award-winning expertise in content, community services, expert...
