Live data from Hacker News

Why Is JRuby Slow?

earthly.dev

61–64 of 64 posts

Re: Why Is JRuby Slow?

#61
post #17

Earlier quoted context omitted.

> 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.

To be just, Lua is drastically simpler as a language. A simpler language likely takes less effort to write an efficient JIT for its VM.

How is the state of LuaJIT since Mike's departure?

I don't follow Lua, but I got the feeling it is pretty much stuck on its last version.

Re: Why Is JRuby Slow?

#62
post #57
post #30

Earlier quoted context omitted.

There is nothing at the JVM level that would disallow such dynamism. Clojure, JRuby, JPython all can run on the JVM. Also, if you are looking for interop, then GraalVM might be worth a look — not the better-known AOT part, but the runtime one, which can seamlessly do interop between a number of languages, and it even optimizes between them!

Yes, being possible and being performant are two very different things. What I intended to convey in my previous comment was that using strategies like pre-compilation (eg. Spring EL) it is possible to get good performance even for dynamic logic not known at runtime. So I was curious what was so dynamic about this use case that JVM performance drops down to pythonesque level. I don't want to speculate - maybe there i…

Seeing all the dynamic languages running on top of the JVM without any trouble, I doubt the answer should be sought at that level.

Re: Why Is JRuby Slow?

#63
post #55

My impression is that interest in JRuby has gradually declined, in favor of CRuby (MRI). I guess both because CRuby has gotten a lot faster, and because in practice any difference is easily paved over with extra hardware (which is cheap).

IMHO interest in ruby (irrespective of implementation) itself is declining. A lot of people have realised that dynamic typing hinders maintenance of long lived projects and the tooling and dev experience with type safe languages have also gotten much better over last few years. Despite having worked with Ruby for multiple years, I pick Kotlin/C# for new projects. I know ruby has recently introduced support for typing…

The Ruby community continues to grow in absolute terms of you’re looking at conference numbers etc. The rest of the industry exploded!

Re: Why Is JRuby Slow?

#64
post #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.

> I remember about 10 years ago the promise was that JRuby was going to let ruby be basically as fast as Java I’m pretty sure it was more than 10 years ago that Charles Nutter wrote a detailed description of why that wasn’t going to happen without breaking compatibility with Ruby, identifying the specific language features preventing that.

The Truffle based implementations of dynamic languages get close depending on what you’re benchmarking.

https://stefan-marr.de/papers/dls-marr-et-al-cross-language-...

Post reply on HN