What is InvokeDynamic (JSR 292)?

New in Java 7, JSR 292 allows dynamic languages like JRuby and Jython to run faster on the JVM than in previous versions of the JDK. It accomplishes these performance improvements thanks to a new Java bytecode, invokedynamic, for method invocation, as well as a new linkage mechanism that involves a structure called a method handle. In short, InvokeDynamic allows the developers working on compilers for dynamic languages to generate bytecode that runs exceptionally fast in the JVM.

The group behind JSR 292 hopes that Invoke Dynamic helps to increase the number of languages -- particularly dynamic languages -- that can run in the JVM. In addition, it should result in performance improvements for those languages that already run in the JVM.

Source link

New JDK 7 Feature: Support for Dynamically Typed Languages in the Java Virtual Machine