# Ways to compare the performance of different Ruby implementations

**URL:** <https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477>\
**Category:** ruby-talk\
**Created:** [11 May 2010 03:11 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477 "2010-05-11T03:11:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carter\_Cheng](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Carter\_Cheng](https://rubytalk.org/u/Carter_Cheng)\
**Post date:** [11 May 2010 03:11 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/1 "2010-05-11T03:11:28Z")

</div>

Greetings,

I have recently become interested in Ruby and I was curious what the  
correct approach was in measuring the performance of the various VM  
against one another. I.e. YARV, JRuby, MRI etc. What kind of  
applications or benchmarks are good for this purpose.

Thanks in advance,

Carter.

---

<div class="post-metadata">

**Author:** ![Charles\_Nutter](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/charles_nutter/32/2567_2.png) [@Charles\_Nutter](https://rubytalk.org/u/Charles_Nutter)\
**Post date:** [12 May 2010 09:42 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/2 "2010-05-12T09:42:09Z")

</div>

The best benchmark is your own application. Synthetic benchmarks are  
good at one thing: giving synthetic perf comparisons.

> **···**
>
> On Tue, May 11, 2010 at 3:11 AM, Carter Cheng \<cartercheng@gmail.com\> wrote:
> 
> > Greetings,
> > 
> > I have recently become interested in Ruby and I was curious what the  
> > correct approach was in measuring the performance of the various VM  
> > against one another. I.e. YARV, JRuby, MRI etc. What kind of  
> > applications or benchmarks are good for this purpose.
> > 
> > Thanks in advance,
> > 
> > Carter.

---

<div class="post-metadata">

**Author:** ![Carter\_Cheng](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Carter\_Cheng](https://rubytalk.org/u/Carter_Cheng)\
**Post date:** [12 May 2010 15:51 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/3 "2010-05-12T15:51:59Z")

</div>

Thanks for the reply. I guess perhaps my original post might not have  
been too clear. I am actually not interested in running applications  
per se but in understanding the strengths and weaknesses of each of  
the respective platforms. I am trying to figure out what runs  
fast/slow on each platform and what each of them are good at  
performance wise. In terms of techniques I am curious how to proceed.

Thank in advance,

Carter.

---

<div class="post-metadata">

**Author:** ![Roger\_Pack4](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Roger\_Pack4](https://rubytalk.org/u/Roger_Pack4)\
**Post date:** [12 May 2010 17:23 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/4 "2010-05-12T17:23:47Z")

</div>

Carter Cheng wrote:

> Thanks for the reply. I guess perhaps my original post might not have  
> been too clear. I am actually not interested in running applications  
> per se but in understanding the strengths and weaknesses of each of  
> the respective platforms. I am trying to figure out what runs  
> fast/slow on each platform and what each of them are good at  
> performance wise. In terms of techniques I am curious how to proceed.

There's the ruby benchmark suite:

> **[GitHub - acangiano/ruby-benchmark-suite: A set of Ruby benchmarks for testing...](https://github.com/acangiano/ruby-benchmark-suite)**
>
> A set of Ruby benchmarks for testing Ruby implementations. - GitHub - acangiano/ruby-benchmark-suite: A set of Ruby benchmarks for testing Ruby implementations.

I believe Antonio is about to do another blog post on the various  
implementations on various platforms.

GL!  
-rp

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Edward\_Middleton](https://avatars.discourse-cdn.com/v4/letter/e/8baadc/32.png) [@Edward\_Middleton](https://rubytalk.org/u/Edward_Middleton)\
**Post date:** [13 May 2010 01:54 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/5 "2010-05-13T01:54:41Z")

</div>

I suggest you look at, and understand the qualitative differences  
between the implementations before getting into benchmarking.

ruby 1.8 only supports green threads  
ruby 1.9 supports native threads with a GIL Global Interpreter Lock  
jruby supports native threads

There are obviously other differences and other implementations.

Edward

> **···**
>
> On 05/13/2010 12:51 AM, Carter Cheng wrote:
> 
> > ... I am actually not interested in running applications  
> > per se but in understanding the strengths and weaknesses of each of  
> > the respective platforms. I am trying to figure out what runs  
> > fast/slow on each platform and what each of them are good at  
> > performance wise. In terms of techniques I am curious how to proceed.

---

<div class="post-metadata">

**Author:** ![Carter\_Cheng](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Carter\_Cheng](https://rubytalk.org/u/Carter_Cheng)\
**Post date:** [13 May 2010 00:57 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/6 "2010-05-13T00:57:30Z")

</div>

Thanks Roger. I will check it out.

---

<div class="post-metadata">

**Author:** ![Carter\_Cheng](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@Carter\_Cheng](https://rubytalk.org/u/Carter_Cheng)\
**Post date:** [13 May 2010 07:29 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/7 "2010-05-13T07:29:53Z")

</div>

I have been looking at the source code. Are there other ways of  
getting into the differences between the implementations?

> **···**
>
> On Thu, May 13, 2010 at 9:54 AM, Edward Middleton \<edward.middleton@vortorus.net\> wrote:
> 
> > On 05/13/2010 12:51 AM, Carter Cheng wrote:
> > 
> > > ... I am actually not interested in running applications  
> > > per se but in understanding the strengths and weaknesses of each of  
> > > the respective platforms. I am trying to figure out what runs  
> > > fast/slow on each platform and what each of them are good at  
> > > performance wise. In terms of techniques I am curious how to proceed.
> > 
> > I suggest you look at, and understand the qualitative differences  
> > between the implementations before getting into benchmarking.
> > 
> > ruby 1.8 only supports green threads  
> > ruby 1.9 supports native threads with a GIL Global Interpreter Lock  
> > jruby supports native threads
> > 
> > There are obviously other differences and other implementations.
> > 
> > Edward

---

<div class="post-metadata">

**Author:** ![Charles\_Nutter](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/charles_nutter/32/2567_2.png) [@Charles\_Nutter](https://rubytalk.org/u/Charles_Nutter)\
**Post date:** [14 May 2010 07:59 UTC](https://rubytalk.org/t/ways-to-compare-the-performance-of-different-ruby-implementations/58477/8 "2010-05-14T07:59:25Z")

</div>

Ask the implementers? 🙂

> **···**
>
> On Thu, May 13, 2010 at 7:29 AM, Carter Cheng \<cartercheng@gmail.com\> wrote:
> 
> > I have been looking at the source code. Are there other ways of  
> > getting into the differences between the implementations?
> > 
> > On Thu, May 13, 2010 at 9:54 AM, Edward Middleton \> \<edward.middleton@vortorus.net\> wrote:
> > 
> > > On 05/13/2010 12:51 AM, Carter Cheng wrote:
> > > 
> > > > ... I am actually not interested in running applications  
> > > > per se but in understanding the strengths and weaknesses of each of  
> > > > the respective platforms. I am trying to figure out what runs  
> > > > fast/slow on each platform and what each of them are good at  
> > > > performance wise. In terms of techniques I am curious how to proceed.
> > > 
> > > I suggest you look at, and understand the qualitative differences  
> > > between the implementations before getting into benchmarking.
> > > 
> > > ruby 1.8 only supports green threads  
> > > ruby 1.9 supports native threads with a GIL Global Interpreter Lock  
> > > jruby supports native threads
> > > 
> > > There are obviously other differences and other implementations.
> > > 
> > > Edward
