Live data from Hacker News

JRuby 9000 released

blog.jruby.org

11–20 of 119 posts

Re: JRuby 9000 released

#12
post #5

is it faster than MRI?

JRuby used to be much faster than MRI (definitely so when MRI 1.8 was current), but MRI has gotten better faster than JRuby, and IIRC, its now mostly a mixed bag based on workload, particular application design choices, etc.

Re: JRuby 9000 released

#13
post #5

is it faster than MRI?

It is a stated goal of the JRuby project to meet or exceed MRI performance. The team will actually accept issues/bugs if you can provide a (well structured and isolated) benchmark illustrating a performance deficiency relative to MRI.

Re: JRuby 9000 released

#15
post #9

JRuby is a great idea. It has one pitfall which consistently stops me from using it though : poor support with newer releases of Rails, usually due to the Active Record stack not working well with the AR JDBC adapter. I know some work was being done on a JRuby version of the standard pg gem (without the need for JDBC) which would be fantastic if it was completed and working.

Define "newer" and define "poor"? The JRuby team has done a fantastic job of keeping things working. Do you have any specific problems other than vague grumblings?

Anyone married to the MRI ecosystem because of dependencies on modules with no JVM equivalent may have problems, but new projects usually have no such issues.

Re: JRuby 9000 released

#16
post #5

is it faster than MRI?

That depends on what you mean by faster. For CPU-bound work, JRuby is almost always faster. The JVM is very good at optimizing. However, the best performance doesn't kick in until the JVM is sufficiently warmed up, which means JRuby shines mostly for long-running tasks. Warming up can take a few minutes, although some people tell me that I should warm up for half an hour (!).

On the flip side, JRuby starts much more slowly than MRI. This is a general Java problem: startup times are problematic. Also, code reloading performance may be worse than MRI, so things may be slow in development. JRuby is optimized for production-level long-running workloads. So something like 'rake' will likely take longer with JRuby.

Re: JRuby 9000 released

#18
post #5

is it faster than MRI?

That depends on what you mean by faster. For CPU-bound work, JRuby is almost always faster. The JVM is very good at optimizing. However, the best performance doesn't kick in until the JVM is sufficiently warmed up, which means JRuby shines mostly for long-running tasks. Warming up can take a few minutes, although some people tell me that I should warm up for half an hour (!). On the flip side, JRuby starts much more…

In practice I've found the start-up times aren't all that different. The drag is more pronounced on older hardware, though. A current i5 or i7 system with an SSD is usually roughly the same.

Re: JRuby 9000 released

#19
post #5

is it faster than MRI?

The real advantage comes from the fact that JRuby isn't enslaved to a GIL like MRI, so you get JVM threads out of the box. Even with the JIT, JRuby (at least 1.7) isn't appreciably faster than MRI when running a single-threaded app: http://www.isrubyfastyet.com/

Re: JRuby 9000 released

#20
post #5

is it faster than MRI?

What I read is that it's faster for long running applications (example: web apps) because the JIT can optimize the code. It should be slower for anything else, example: tests (very unfortunately).

I don't know what the edit-reload-check workflow could be with JRuby and how well it can integrate with editors (few Rubyist use IDEs, http://www.sitepoint.com/ides-rubyists-use/).

Anyway, I'm doing a bundle install with jruby on a Rails project right now. Let's see if it completes and passes the tests.

Post reply on HN