hur.st's bl.aagh

BSD, Ruby, Rust, Rambling

Micro-Optimising in JRuby

Calling Java from JRuby for fun and profit

[ruby] [jruby] [java]

One of the neatest bits of JRuby is the simple way you can call out to Java. There’s a lot of Java out there, and you can wrap it up in nice little Ruby interfaces with just a few lines of code.

Let’s illustrate with some trivial examples, hooking up bits of Java to Ruby and seeing how well they perform compared to the equivalent pure Ruby.

Continue Reading