Live data from Hacker News

Massive Ruby speed boost with JRuby and Java 7.

blog.jruby.org

31–40 of 79 posts

Re: Massive Ruby speed boost with JRuby and Java 7.

#31
post #26

Earlier quoted context omitted.

a) There will be problems in the Computer Language Benchmark. Like with the excellent LuaJit, they only allow one version of a language, so a war of implementations to appear would not be surprising. b) Now that Python is in a difficult transition to Python 3, a strong ruby is a game changing point. Antonio Cangiano `New Relic Holy Shmoly, Ruby 1.9 smokes Python away!` could be Jruby smokes Python away :) (if there i…

b) Also Jython is virtually dormant, at some older version of Python, while both JRuby and IronRuby are actively worked on. c) Groovy hasn't added any support for invokedynamic or even started on it. A month ago they announced they're removing their meta-object protocol rework from the upcoming version 2.0. SpringSource seem to be repositioning Groovy as a staticly-typed language, this year adding primitive types lik…

I find it a bit of a dodge when a dynamic language has to go to static types for performance. That's not to say I haven't wanted to have that dodge available to JRuby users, but being unable (or unwilling) to unilaterally add optional static types to Ruby, we've been forced to find more creative options. We'll probably never approach Java's raw primitive math performance, but I think we can easily match Java's speed (and in some cases, already do) at manipulating objects.

It also appears that the push toward more static typing in Groovy may come at the cost of dynamicity...or at least incompatible changes in Groovy's dynamic features. Perhaps it's the best move for them, though; they've always pushed Groovy's ability to run (and enhance) plain old Java code, but performance was considerably worse than Java.

It's unfortunate that other JVM dynamic languages did not start exploring invokedynamic sooner. It has been a complete game-changer for JRuby.

Re: Massive Ruby speed boost with JRuby and Java 7.

#32
post #28
post #23

Earlier quoted context omitted.

I'm a big fan of JRuby for two notable reasons. First, JRuby runs on the JVM, which is arguably the most mature and tested VM on the market today; second, you can leverage both the Ruby and Java ecosystems without any additional overhead (the Java interop is almost seamless). Being able to write classes in Java (or Mirah) where speed is crucial, and use them from within JRuby without having to do any additional work,…

I believe Rails can also run on the JVM via JRuby. I wonder what the benchmark is between Rails/JVM and Grails 2.0 ???

Rails runs quite well on JRuby, indeed. I have no information on its performance relative to other frameworks, though.

Re: Massive Ruby speed boost with JRuby and Java 7.

#33
post #30

Earlier quoted context omitted.

Why would respect for the MRI devs stop you from publishing benchmarks? It's not an insult to say that something else is faster. I'd imagine the competition might drive them to improve if at all possible.

I feel like the MRI devs get beat on a bit too much, and they're doing the best job possible with very few paid developers. I'm more interested in showing how JRuby is improving over time than rubbing salt in the wounds.

Great attitude.

Re: Massive Ruby speed boost with JRuby and Java 7.

#35
post #5

I just update to java7 in ubuntu 11.04 then using sudo update-java-alternatives there is an error: no alternatives for -javaplugin.so

Your updated Java 7 is probably a 64-bit version. There's currently no Java applet browser plugin for 64-bit (and I'm not sure if there's plans to create one). If you don't mind missing out on Java applets, you'll be fine.

Is this the case for Java 7? It's not the case for Java 6. There is one from Oracle, which I'm using.

  $ file .mozilla/plugins/libnpjp2.so 
  .mozilla/plugins/libnpjp2.so: symbolic link to
  `/usr/local/lib/jvm/jre1.6.0_29/lib/amd64/libnpjp2.so'
There's one from OpenJDK as well.

  $ apt-cache show icedtea-plugin
  Package: icedtea-plugin
  Source: icedtea-web
  Version: 1.1.4-1
  Installed-Size: 276
  Maintainer: OpenJDK Team 
  Architecture: amd64

Re: Massive Ruby speed boost with JRuby and Java 7.

#36
post #35
post #5

Earlier quoted context omitted.

Your updated Java 7 is probably a 64-bit version. There's currently no Java applet browser plugin for 64-bit (and I'm not sure if there's plans to create one). If you don't mind missing out on Java applets, you'll be fine.

Is this the case for Java 7? It's not the case for Java 6. There is one from Oracle, which I'm using. $ file .mozilla/plugins/libnpjp2.so .mozilla/plugins/libnpjp2.so: symbolic link to `/usr/local/lib/jvm/jre1.6.0_29/lib/amd64/libnpjp2.so' There's one from OpenJDK as well. $ apt-cache show icedtea-plugin Package: icedtea-plugin Source: icedtea-web Version: 1.1.4-1 Installed-Size: 276 Maintainer: OpenJDK Team Architec…

Perhaps IcedTea (RedHat's fork of OpenJDK) has included a 64-bit plugin. I did not think OpenJDK/OracleJDK had done so yet...but I'd love to be proven wrong.

Re: Massive Ruby speed boost with JRuby and Java 7.

#38
post #37
post #34

The only pain for me? The JRuby binaries are on Amazon S3 and my "expletive" company blocks Amazon S3.

That is truly bizarre. There's probably mirrors of the JRuby downloads somewhere, eh? I don't know them offhand...

I tried to find one but I ended up "cheating". If you try and send from a gmail account it will fail but gmail will keep the file on its servers. So I can log into gmail at work, and download the binary from the failed sent message. sigh

Re: Massive Ruby speed boost with JRuby and Java 7.

#40

how does eventmachine run on jruby and does anyone actually use jruby and eventmachine in production?

EM does work, but it's not commonly used on JRuby. I think the fact that JRuby has real parallel-executing threads makes eventing frameworks like EM less interesting...especially since EM only runs a single event loop.

I'd love to hear about people actually using EM on JRuby, if there's such folks out there.

Post reply on HN