RFR: 8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long
    Vamsi Parasa 
    duke at openjdk.java.net
       
    Wed Feb 23 22:55:11 UTC 2022
    
    
  
On Wed, 23 Feb 2022 05:52:00 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Optimizes the divideUnsigned() and remainderUnsigned() methods in java.lang.Integer and java.lang.Long classes using x86 intrinsics. This change shows 3x improvement for Integer methods and upto 25% improvement for Long. This change also implements the DivMod optimization which fuses division and modulus operations if needed. The DivMod optimization shows 3x improvement for Integer and ~65% improvement for Long.
>
> test/micro/org/openjdk/bench/java/lang/IntegerDivMod.java line 76:
> 
>> 74:         return quotients;
>> 75:     }
>> 76: 
> 
> Return seems redundant here.
Will remove it.
> test/micro/org/openjdk/bench/java/lang/IntegerDivMod.java line 83:
> 
>> 81:         }
>> 82:         return remainders;
>> 83:     }
> 
> Return seems redundant here.
Will remove it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7572
    
    
More information about the core-libs-dev
mailing list