Charles Oliver Nutter
10/26/2006 4:49:00 AM
Giles Bowkett wrote:
> 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.)
>
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.
--
Charles Oliver Nutter, JRuby Core Developer
headius@headius.com -- charles.nutter@sun.com
Blogging at headius.blogspot.com