# Jruby \<=\> prime time?

**URL:** <https://www.ruby-forum.com/t/jruby-prime-time/73674>\
**Category:** Ruby\
**Created:** [October 26, 2006, 4:29am UTC](https://www.ruby-forum.com/t/jruby-prime-time/73674 "2006-10-26T04:29:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 26, 2006, 4:29am UTC](https://www.ruby-forum.com/t/jruby-prime-time/73674/1 "2006-10-26T04:29:11Z")

</div>

I’ve got a project for which I might need to write a fast and very small  
server.

I was initially thinking, that if I do in fact need to do this, that I  
would have to choose Python over Ruby for the server, because it would  
be faster.

however – is JRuby fast enough for something like this?

(because it would definitely be cool if it was.)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 26, 2006, 6:33am UTC](https://www.ruby-forum.com/t/jruby-prime-time/73674/2 "2006-10-26T06:33:29Z")

</div>

JRuby can be almost as fast as Java. So basically if you think Java  
is fast enough for writing your server, then JRuby _should_ be fast  
enough.

Given the latest release of BSF (bean scripting framework), the  
following languages can also be used on the JVM with little effort

- js
- ruby
- beanshell
- judoscript
- python
- nice
- pnuts
- Kawa (scheme on Java, doesn’t use bsf)

- more I can’t remember now 🙂

Bottom line, if Java would be fast enough, then most of the above  
would be fast enough - the JRuby devs are probably lurking around here  
and can give you a more informed delta for the difference in execution  
of ‘normal’ Java vs JRuby

Thanks,  
Kev

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 26, 2006, 6:49am UTC](https://www.ruby-forum.com/t/jruby-prime-time/73674/3 "2006-10-26T06:49:31Z")

</div>

Giles B. wrote:

> 

JRuby executing straight-up Ruby code is still a few times slower than  
normal Ruby. We’re working on a few options to speed it up, but there’s  
a bit of work to do. However when a Java library or external resource  
(IO, etc) is involved, however, we usually are comparable or faster. For  
example, a deep iterative fib starts winning in JRuby around the  
300000th fib because of Java’s fast BigInteger class.

If you’re doing mostly straight Java code and integrating it through a  
thin Ruby layer, it will likely be faster than writing the same service  
in pure Ruby…either on the C version or on JRuby.
