Originally reported here:
https://twitter.com/junkdogAP/status/510414300587261952
Remeasuring with:
http://cr.openjdk.java.net/~shade/8058319/ConstructorBenchmark.java
http://cr.openjdk.java.net/~shade/8058319/benchmarks.jar
...and current jdk9-dev (with LF caching already here) yields:
- create_handle 25.301 +- 3.162 ops/us
- create_handle_unreflect 25.424 +- 0.967 ops/us
- create_plain 203.557 +- 33.607 ops/us
- create_reflect 80.443 +- 6.504 ops/us
Perfasm profiles for plain/reflect cases are relatively clean:
http://cr.openjdk.java.net/~shade/8058319/create_plain.perfasm
http://cr.openjdk.java.net/~shade/8058319/create_reflect.perfasm
We seem to blow inlining in MH cases:
http://cr.openjdk.java.net/~shade/8058319/create_handle.perfasm
http://cr.openjdk.java.net/~shade/8058319/create_handle_unreflect.perfasm