RFR: 8333867: SHA3 performance can be improved
    Ferenc Rakoczi 
    duke at openjdk.org
       
    Tue Jun 11 20:08:14 UTC 2024
    
    
  
On Tue, 11 Jun 2024 18:18:41 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> This PR removes some unnecessary conversions between byte arrays and long arrays during SHA3 digest computations.
>
> src/java.base/share/classes/sun/security/provider/SHA3.java line 70:
> 
>> 68:     private long[] state = new long[DM*DM];
>> 69: 
>> 70:     // The following two arrays are allocated to size WIDTH bytes, but we only
> 
> Only one of the following arrays is of WIDTH length... outdated comment?
Well, DM*DM*8 is WIDTH (DM=5 and WIDTH=200), so both arrays have 200 bytes, But I will update the comment to make it clearer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19632#discussion_r1635419497
    
    
More information about the core-libs-dev
mailing list