Using invokedynamic

If you’ve been hanging around the JRuby community at all in the last couple of years, you’ve probably heard about invokedynamic. It’s a new bytecode instruction that was added in Java 7 but didn’t get the kinks worked out of it until Java 8. The invokedynamic instruction promised great performance improvements for JRuby, but it turned out to improve only a few specific cases. Synthetic micro-benchmarks show significant gains, but larger tests and macro-benchmarks haven’t lived up to expectations. In the future, the JRuby core team will learn how to use this JVM feature to its full potential and probably turn it on selectively for you. But for now, JRuby keeps this feature off by default.

You may find it worthwhile to test ...

Get Deploying with JRuby 9k now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.