JRuby is Fast!
Posted by on March 21, 2011
Following up on my previous blog post about Fibonacci numbers and prime-number tests using Python and Ruby (click to read), I thought I’d give the same code a bit of whirl on my new laptop, and throw in the latest 1.6.0 release of JRuby in the mix.
The results:
Fibonacci numbers (40th)
Python 2.7.1 = 106.4s
Ruby 1.9.2 = 44.2s
JRuby 1.6.0 = 30.6s
Prime test (9000000000059)
Python 2.7.1 = 1.33s
Ruby 1.9.2 = 1.74s
JRuby 1.6.0 = 0.68s
JRuby is – performance wise, at least – a truly impressive piece of work! I thought its speed would be comparable to MRI/YARV, but nope, it goes beyond. Well done to the JRuby team.
Advertisement