benchmark unaligned memory access
YC Huang
ychuang_cn at hotmail.com
Fri Mar 6 02:18:12 UTC 2015
Thank you Nitsanw, running with "prof perfasm" shows there do have implicit Blackhole.consume():
....[Hottest Methods (after inlining)]..............................................................
45.12% 23.97% org.sample.MemoryAccessTest::alignedMemAccess
29.23% 39.38% org.sample.generated.MemoryAccessTest_alignedMemAccess::alignedMemAccess_avgt_jmhStub
16.80% 30.44% org.openjdk.jmh.infra.Blackhole::consume
I change the method to void Instead of return something, and assign the value to a class field,which seems could eliminate the implicit Blackhole.consume() and still avoid DCE...
More information about the jmh-dev
mailing list