Long.bitCount micro-optimization
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue May 9 14:28:20 UTC 2017
To expand a bit on Martin's point - I think your benchmark should
include a 'baseline' version of bitCountInt/bitCountLong whose
implementation simply delegates to the JDK methods
(Integer.bitCount/Long.bitCount) - I see that bitCount is on the list of
supported intrinsics [1], so, by adding those 'baselines'
intrinsification should definitively kick in, and give you different
(possibly even better) numbers.
[1] -
http://hg.openjdk.java.net/jdk9/dev/hotspot/file/tip/src/share/vm/classfile/vmSymbols.hpp#l830
Maurizio
On 09/05/17 03:54, Martin Buchholz wrote:
> I would also have benchmarked against the intrinsified version to see how
> it did.
More information about the core-libs-dev
mailing list