Quantcast
Channel: Scratch Where It's Itching
Viewing all articles
Browse latest Browse all 73

Devoxx France - Invokedynamic them all

$
0
0
This talk was given by Remi Forax, teacher at the University of Marnes-la-Vallée, and also part of the JSR dealing with the invokedynamic.

He explained a bit about the internals of invokedynamic, and the use of the new java.lang.invoke package which is supposed to bring better performance than reflection for calling methods by handle. But the main part of the talk was about how to find out what the JVM is really doing to optimise your code.

He advised to try the -XX:+PrintCompilation flag for checking what method the JVM is compiling to native assembly, and the -XX:+PrintInlining flag for checking which one is inlined. The last flag he talked about is -XX:+PrintAssembly to see the actual assembly code produced. But if I understood well, to use this flag, you have to get the OpenJDK, tweak its compilation, and use another flag to unlock it (-XX:+UnlockDiagnosticVMOptions ?) ...

In short, do not believe your benchmarks, but rather what is really happening in your application.


Viewing all articles
Browse latest Browse all 73

Trending Articles