Thursday, October 4, 2007

JRuby Compiler Performance

I was pretty excited when I heard that JRuby's compiler was complete. I figured I could run some benchmarks against the C-Based Ruby Implementation to see how it was performing. I've only run this suite once, but I hope to provide enough info so that you could replicate the results yourself. Please let me know if you think I missed something.


The Setup

The benchmarks were run on a Dell D820 laptop. It has an Intel Core Duo running at 2.17GHz and has 1GB of RAM. I'm running Ubuntu 7.04 for an OS. The only wrinkle in my setup is that my root partition is encrypted using LUKS/dmcrypt. This will probably slow down the IO benchmarks, but I'm assuming it would penalize both Ruby implementations equally.


For the C-Based Ruby Implementation, I'm using the Ubuntu packaged Ruby version 1.8.5. For JRuby, I checked out the latest from Codehaus's SVN (Rev 4474) and built the code using Sun's Java version 1.6.0.


For the benchmarks, I pulled the suite from the Ruby Lang SVN (Rev 13608). 


I ran the benchmarks using the run.rb script. The C-Based Ruby Implementation was run with no command line options. I modified the script to run JRuby withe the following options:

  • -C to compile the ruby code before running it
  • -O to disable ObjectSpace
  • -J-Djruby.thread.pooling=true to enable thread pooling
  • -J-server to put the JVM in server mode

These options are explained in the Performance Tuning and Compiler pages of the JRuby Wiki.


The Results

The following shows the time it took the Ruby Implementation to perform the benchmark in seconds:



Here is the difference between the two implementations (CRuby - JRuby) again, in seconds:



As you can see, JRuby is performing really well on a lot of these benchmarks. It gets killed on eval, but I suppose that is to be expected. My guess is that JRuby is taking advantage of Java primitives to outperform CRuby at number crunching. Charles Nutter's comments at another blog entry on JRuby benchmarking seem to indicate that this would be the case. Can't wait until JRuby is 1.1

14 comments:

dawnc said...

The construct has been designed to twin as a general cash advances short remedy for your current economical wants. A bankruptcy continued professional vegas advance will get paid, you then contains style of decisions in respect to ways in which to possess a bent to repay.

marko said...

Retail or eatery business is about sparing in little amounts €" be it item, time, vitality and even money. The arrival on venture is guaranteed if your business is keep running by individuals with pertinent experience and you are utilizing the right kind of gadgets or types of gear. car title loans richmond

marko said...

As opposed to paying a lot on high premium obligation, they have started to perceive auto title advances as a quick and moderate approach to get the cash they require.Value advances on auto titles utilize the estimation of an auto as guarantee, permitting loan specialists to diminish interest rates. Check Cashing

marko said...

As opposed to paying a lot on high premium obligation, they have started to perceive auto title advances as a quick and moderate approach to get the cash they require.Value advances on auto titles utilize the estimation of an auto as guarantee, permitting loan specialists to diminish interest rates. Check Cashing

marko said...

Presently, feel glad as you can wind up the greater part of your need as soon as possible because of the accessibility of the content advances that are the heavenly arrangements of money. Everybody can investigate it at online world by getting their names enrolled and the entire procedure takes just a couple of minutes. usacheckcashingstore.com/corona

musa ibrahim said...

At the point aback enchanting for motorbike money, there are an alloyed sack of edges you'll charge to consider. These will hold the costs decisions open, legend love term, and upkeep rates. Cash Advance San-diego

Anmona Ami said...


Ever admiration if you can get 100% costs on bartering properties? Is the accommodation with everyman bulk best for you? Do you apperceive UPS, yes the aggregation with amber trucks, is additionally a bartering absolute acreage lender?

aaa1autotitleloans.com/chicago

Shan Jonson said...


First of all, you should apperceive your acclaim score. The coffer absolutely does. Your acclaim account will comedy a ample role in any bank's accommodation about your accommodation application. If you accept bad credit, it may be absurd to access a accommodation through your bank. On the added hand, payday lenders don't attending at your acclaim score.
Payday Loans

Justin said...

The Yen was at an unsurpassed low implying that they could manufacture the autos much less expensive and re-put a lot of these benefits in R and D extends, some of hit the roads as right on time as May of 2003 as they discharged the 2004 models. This will be a war for all makers as the forceful Japanese Toyota organization goes for the gold. cash advance

Justin said...

An effective apparatus account holders have available to them if they wind up in a chapter 11 circumstance is the capacity to pay just the estimation of a benefit. This is especially alluring on the off chance that you have a lien against secured property, for example, a vehicles, contract on pay property or bit of furniture that far surpasses the estimation of the property. car title loans

Justin said...

There are a few people involving these credits for paying off their understudy advance soon enough. As communicated in our past articles, there are two fundamental sorts of solidification decisions, they are government and private understudy credit union. Payday Loans

marko said...

Whether you are an understudy or not, when you are acquiring a credit of any sort that offers an altered loan fee you can anticipate that it will be somewhat higher on the grounds that the moneylender needs to have the capacity to profit despite the fact that it is not fluctuating. check cashing

Paulo said...

On the off chance that you are searching for understudy credit help, National Student Loan Relief (NSLR) is the perfect spot to begin. We work as one with the Department of Education to effectively alleviate Federal understudy credit obligation. Visit National Student Loan Relief at. Payday Loans San-diego

Paulo said...

Ci sono una serie di trattamenti di disfunzione erettile che sono stati formulati dagli esperti per facilitare coloro che sono affetti da questa condizione. E 'un fatto ben noto che la maggior parte degli uomini soffrono di questa condizione; tuttavia, evitano discutere su di esso in modo da evitare ogni sorta di imbarazzo causa loro. Comprare pillola blu postepay