RFR 8189230: JDK method:java.lang.Integer.numberOfLeadingZeros(int) can be optimized
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Mar 13 23:44:39 UTC 2018
On Mar 13, 2018, at 4:42 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> Given how trivial the changes are it looks ok, but not sure it really matters in practice.
Nor do I.
>
> —
>
> Note that it’s possible to selectively disable intrinsics. For future reference, when you want to avoid copying code if you happen to benchmark intrinsics in the future:
>
> -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_numberOfLeadingZeros_i
Yes, I knew about that.
> But you have to know the intrinsic name, you can find ‘em here:
>
> http://hg.openjdk.java.net/jdk/jdk/file/63eceefeb347/src/hotspot/share/classfile/vmSymbols.hpp#l805
This latter is very helpful, thanks.
Brian
More information about the core-libs-dev
mailing list