# Hongli's merge sort benchmark runs 2x faster in JRuby/Ruby 1.9

**URL:** <https://www.ruby-forum.com/t/honglis-merge-sort-benchmark-runs-2x-faster-in-jruby-ruby-1-9/159490>\
**Category:** JRuby\
**Created:** [February 5, 2009, 1:15am UTC](https://www.ruby-forum.com/t/honglis-merge-sort-benchmark-runs-2x-faster-in-jruby-ruby-1-9/159490 "2009-02-05T01:15:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [February 5, 2009, 1:15am UTC](https://www.ruby-forum.com/t/honglis-merge-sort-benchmark-runs-2x-faster-in-jruby-ruby-1-9/159490/1 "2009-02-05T01:15:47Z")

</div>

I wrapped Hongli’s simple merge sort benchmark described here:

[http://izumi.plan99.net/blog/index.php/2008/01/17/ruby-vs-php-performance](http://izumi.plan99.net/blog/index.php/2008/01/17/ruby-vs-php-performance)

in Ruby’s Benchmark library and did a more detailed comparison of  
1.8.6, 1.9 trunk, and JRuby running on Java 1.5, 1.6, and 1.7.

[http://blog.concord.org/archives/24-Comparison-of-Ruby-1.8.6-1.9-and-JRuby-running-on-Java-1.5-1.6-and-1.7.html](http://blog.concord.org/archives/24-Comparison-of-Ruby-1.8.6-1.9-and-JRuby-running-on-Java-1.5-1.6-and-1.7.html)

The fastest “safe” result shows that JRuby running on Java 1.6 on  
MacOS X\* is a little more than twice as fast as Ruby 1.9.

I also have measurements using the “-fast” option with JRuby that  
show a performance almost 2.5 times that of Ruby 1.9 – but the use  
of this option is still experimental.

- Apple’s Java 1.6 is 64-bit and always runs in server mode

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [February 5, 2009, 6:11am UTC](https://www.ruby-forum.com/t/honglis-merge-sort-benchmark-runs-2x-faster-in-jruby-ruby-1-9/159490/2 "2009-02-05T06:11:14Z")

</div>

Stephen B. wrote:

> The fastest “safe” result shows that JRuby running on Java 1.6 on MacOS  
> X\* is a little more than twice as fast as Ruby 1.9.
> 
> I also have measurements using the “-fast” option with JRuby that show a  
> performance almost 2.5 times that of Ruby 1.9 – but the use of this  
> option is still experimental.
> 
> - Apple’s Java 1.6 is 64-bit and always runs in server mode

Very nice results, Stephen, thank you. I think we’ll want to get more of  
these kinds of posts out as we approach 1.2 release.

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email
```

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [February 14, 2009, 10:20pm UTC](https://www.ruby-forum.com/t/honglis-merge-sort-benchmark-runs-2x-faster-in-jruby-ruby-1-9/159490/3 "2009-02-14T22:20:07Z")

</div>

Stephen B. wrote:

> I wrapped Hongli’s simple merge sort benchmark described here:
> 
> [http://izumi.plan99.net/blog/index.php/2008/01/17/ruby-vs-php-performance](http://izumi.plan99.net/blog/index.php/2008/01/17/ruby-vs-php-performance)
> 
> in Ruby’s Benchmark library and did a more detailed comparison of  
> 1.8.6, 1.9 trunk, and JRuby running on Java 1.5, 1.6, and 1.7.

Cool. I added that test to the ruby benchmark suite, for fun.

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

Enjoy.  
-=r
