Live data from Hacker News

Massive Ruby speed boost with JRuby and Java 7.

blog.jruby.org

71–79 of 79 posts

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

#71
post #52
post #25

Earlier quoted context omitted.

Oh, and regarding JRuby versus Python 3...yes, if Ruby 1.9 smokes Python, and JRuby is faster than Ruby 1.9, then JRuby should smoke Python even more. I have not done the comparisons myself, though.

> if Ruby 1.9 smokes Python A big IF? :-) http://shootout.alioth.debian.org/u32/benchmark.php?test=all...

PyPy?

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

#72
post #25

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…

Oh, and regarding JRuby versus Python 3...yes, if Ruby 1.9 smokes Python, and JRuby is faster than Ruby 1.9, then JRuby should smoke Python even more. I have not done the comparisons myself, though.

Except that Python has scipy,numpy and cython in its camp. I have spent the last six months of my life making Python code run faster. You can write slow code very quickly in Python. If your users complain about it being too slow you can implement some critical sections in Cython. (again with very minor changes). That being said there is a overhead to calling functions in Python which I would like addressed. (Dictionary lookups were three times as fast as function calls when I measured them).

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

#73
post #69

It is also important to mention that java7 G1 garbage collector gives much better results for certain installations (of course test it before deploying it on production). The pauses are much more predictable and, in my case, much shorter. Here is how to get Oracle Java7 on Ubuntu: wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz tar -xvf jdk-7-linux-x64.tar.gz sudo mkdir -p /usr/lib/jvm/ sudo…

G1 is definitely an interesting piece of work. It's geared toward very large heaps where you need more predictable pause times, and is intended to replace the concurrent mark/sweep GC.

To enable G1 on Java 7: -XX:+UseG1GC. Prepend -J if passing to the 'jruby' command.

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

#74
post #63
post #54

I've been eyeing jruby for quite a while but never had much success with it. There seems to always be the odd gem not supporting it (e.g. jruby-openssl is broken which a lot of my stuff depends on).

OpenSSL is a terribly complex library to support, but we've managed to steadily improve our pure-Java port (originally a herculean effort by Ola Bini, it wraps bouncycastle in an OpenSSL-lookalike API). There's still probably issues, but we have tried to fix them as they come up.

Yes, that was no criticism, I'm hoping jruby will succeed.

Fwiw, I'm currently blocked on http://jira.codehaus.org/browse/JRUBY-6260

Apparently the fix is already done but hasn't made it into the 0.7.5dev gem yet.

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

#75
post #59
post #54

I've been eyeing jruby for quite a while but never had much success with it. There seems to always be the odd gem not supporting it (e.g. jruby-openssl is broken which a lot of my stuff depends on).

jruby-openssl has worked fine for me for several years. Making outgoing SSL connections was one of the primary functions of the last app I worked on.

It could indeed be that my jruby endeavors just happened at unfortunate times. The jruby-openssl bug that I'm currently seeing is a different one from last time - and it's apparently fixed in git-HEAD already, just not in the gems yet.

So I'm looking forward to the 0.7.5-release and with a bit of luck I might finally be able to jump on the jruby-bandwagon then.

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

#76
post #68
post #52

Earlier quoted context omitted.

> if Ruby 1.9 smokes Python A big IF? :-) http://shootout.alioth.debian.org/u32/benchmark.php?test=all...

I know some of the implementations there use native libraries that are built into python but only available via RubyGems for Ruby, like numpy. That makes it less of a language shootout (at times) and more of a "who ships the best C libs" shootout. I believe MRI is generally faster than Python now when they're doing roughly equivalent work in Ruby and Python.

> use native libraries that are built into python

Specifically?

> I believe MRI is generally...

Show me the numbers ;-)

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

#77

10-30% faster is “massive”? Ruby standard is 5-30 times slower than all other popular language implementations, I'd expect at least a 100% increase to be considered “massive.” I'd call this just “a speed boost.” Anyway, keep it up.

Three times faster == 300% speed increase. In your terms that would mean a _really_ massive upgrade.

No, it's a 200% speed increase. If the speed before was 1 unit, it's now 3 units. That's 200% more.

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

#78
post #77

Earlier quoted context omitted.

Three times faster == 300% speed increase. In your terms that would mean a _really_ massive upgrade.

No, it's a 200% speed increase . If the speed before was 1 unit, it's now 3 units. That's 200% more.

So if I say it's one time faster, isn't it a 100% increase?
Post reply on HN