RFR 8209171 : Simplify Java implementation of Integer/Long.numberOfTrailingZeros() (original) (raw)
Ivan Gerasimov ivan.gerasimov at oracle.com
Sat Aug 11 02:03:18 UTC 2018
- Previous message: RFR 8209171 : Simplify Java implementation of Integer/Long.numberOfTrailingZeros()
- Next message: RFR 8209171 : Simplify Java implementation of Integer/Long.numberOfTrailingZeros()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Martin!
On 8/9/18 5:42 PM, Martin Buchholz wrote:
On Thu, Aug 9, 2018 at 5:27 PM, Ivan Gerasimov <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote: I did not use the intrinsified variants of numberOfLeadingZeros in the benchmark. Oops! Should have looked more closely! Did you know about http://www.hackersdelight.org/hdcodetxt/ntz.c.txt
Ah, right, ntz1() is even better because it has less branches. How could I miss that?
Here's the updated webrev and benchmarks:
http://cr.openjdk.java.net/~igerasim/8209171/01/webrev/ http://cr.openjdk.java.net/~igerasim/8209171/01/bench/int/MyBenchmark.java http://cr.openjdk.java.net/~igerasim/8209171/01/bench/long/MyBenchmark.java
-- With kind regards, Ivan Gerasimov
- Previous message: RFR 8209171 : Simplify Java implementation of Integer/Long.numberOfTrailingZeros()
- Next message: RFR 8209171 : Simplify Java implementation of Integer/Long.numberOfTrailingZeros()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]