Live data from Hacker News

Why Is JRuby Slow?

earthly.dev

1–10 of 64 posts

Re: Why Is JRuby Slow?

#2
This piece doesn't have much substance. tl;dr; starting a huge VM takes time.

JRuby and it's active maintainer @headius have been great to work with. Surprisingly a very vibrant and active community.

Re: Why Is JRuby Slow?

#3
post #2

This piece doesn't have much substance. tl;dr; starting a huge VM takes time. JRuby and it's active maintainer @headius have been great to work with. Surprisingly a very vibrant and active community.

That seems unfair. Even after warm-up time Jruby and truffleruby are still slower and the truffleRuby folks are investigating it.

I thought looking into why something was slow was worth writing down as a blog post.

https://github.com/agbell/jekyll-perf

Re: Why Is JRuby Slow?

#4
post #2

This piece doesn't have much substance. tl;dr; starting a huge VM takes time. JRuby and it's active maintainer @headius have been great to work with. Surprisingly a very vibrant and active community.

There are/were imperfect cheats to reduce startup times like nailgun, drip, and spork.

The biggest gotchas in JRuby are finding alternatives to native extensions and memory use. What's neat is plugging into JMX from Ruby land.

Re: Why Is JRuby Slow?

#5
I remember about 10 years ago the promise was that JRuby was going to let ruby be basically as fast as Java for many things. Invokedynamic and all that.

Re: Why Is JRuby Slow?

#6
If you want fast Ruby it seems Crystal is your only option. Ruby is an interpreted language released in 1996 for scripting. Why are we surprised when attempts to shoe-horn it into something else (Ruby 3.0, JRuby, Truffle Ruby) fall flat?

Re: Why Is JRuby Slow?

#7
Now that this has gotten attention from the creator of both JRuby and TruffleRuby. I would not be surprised if Jekyll runs ridiculously fast on both implementation in the near future.

Re: Why Is JRuby Slow?

#8
post #6

If you want fast Ruby it seems Crystal is your only option. Ruby is an interpreted language released in 1996 for scripting. Why are we surprised when attempts to shoe-horn it into something else (Ruby 3.0, JRuby, Truffle Ruby) fall flat?

> Ruby is an interpreted language released in 1996 for scripting. Why are we surprised when attempts to shoe-horn it into something else (Ruby 3.0, JRuby, Truffle Ruby) fall flat?

Because Lua (1993) and JavaScript (1995) can be very fast.

Re: Why Is JRuby Slow?

#9
post #6

If you want fast Ruby it seems Crystal is your only option. Ruby is an interpreted language released in 1996 for scripting. Why are we surprised when attempts to shoe-horn it into something else (Ruby 3.0, JRuby, Truffle Ruby) fall flat?

Could you not make the same argument about JavaScript? JavaScript was pretty slow for many years. Google then put some significant engineering investment into the V8 engine, resulting in a huge increase in JavaScript's performance.

Re: Why Is JRuby Slow?

#10
There's once I was running some jruby stuff in jenkins during a build, the job kept on hanging on some stage, I thought there must be bug somewhere, I forced kill it a couple of times with no success, but kept the last one running before I head home. Then after a couple of hours, I found out an email said the built was passed... eventually, I had figured out that jruby was using /dev/random, since jenkins was running in vm, so no enough entropy was generated. after force mounting /dev/random to urandom, the hanging issue just disappeared.
Post reply on HN