On Fri, 21 May 2021 01:19:44 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Fix perf problem by reorganizing doLastBlock()
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java 
> line 1610:
> 
>> 1608:                     // update the input parameters for what was taken 
>> out of 'in'
>> 1609:                     inOfs += inUsed;
>> 1610:                     inLen -= inUsed;
> 
> This merge block code won't be needed if inLen == 0, i.e. can just assign in 
> to be buffer, inOfs to 0, and inLen to bufRemaining.

You are correct, but it's not that simple to handle this case without adding 
more if()'s which I've found can slow down overall performance.  I'm hesitant 
change this code for this case

-------------

PR: https://git.openjdk.java.net/jdk/pull/4072

Reply via email to