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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access