
You’ve Got Java in My Ruby - ivey
http://www.engineyard.com/blog/2009/youve-got-java-in-my-ruby/
======
donw
A lot of pure-Ruby people don't get how powerful this is.

My startup, which will have an early alpha up at the end of the month,
leverages a lot of JRuby's easy Java integration features. Solr, for example,
has been a big win for us -- I've written a Rails plugin that ties to an
embedded Solr server, and because there's no network overhead, search requests
on indexed data finish up in under 30ms before the cache has warmed up, and
1ms once the index has been cached.

On top of that, the JVM (with JRuby, Rails, a database, and Solr) uses less
than 200M of RAM even when being pounded by our benchmark suite, and produces
impressive performance results... even when running on my laptop. On a full-
fleged server machine, the numbers are even more impressive.

And all of this, without having to write a single line of Java. It's a good
time to be hacking on Ruby.

~~~
bensummers
Have you tried running it in 64 bit mode? It'll probably use about twice as
much memory, but my app is about 20% faster compared to 32 bit mode.

~~~
donw
You know, I did, but I found that the app was significantly slower than in
32-bit mode on three different JVMs (Sun, Apple, and OpenJDK), by about...
20%, actually. And it did use twice the memory.

Some googling about seems to show that this is normal; perhaps there's
something else I can tweak in 64-bit mode that I missed?

Even so, we don't reap a lot of benefit from using a 64-bit JVM at this point,
because our app uses so little memory, although that's likely to change down
the road as we load the system more heavily.

~~~
bensummers
I haven't done any tweaking, just a simple comparison between -d32 and -d64.

My current working theory is that the JITed code takes advantage of the
general improvement of 64 bit mode (eg greater number of registers). But right
now performance isn't an issue, I'm running in 64 bit mode for the memory not
the speed.

