> This PR removes some unnecessary conversions between byte arrays and long
> arrays during SHA3 digest computations.
Ferenc Rakoczi has updated the pull request incrementally with one additional
commit since the last revision:
Copyright year update.
-
Changes:
- all: https://
On Fri, 14 Jun 2024 10:39:45 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Fri, 14 Jun 2024 10:39:45 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Fri, 14 Jun 2024 09:47:31 GMT, Ferenc Rakoczi wrote:
>> src/java.base/share/classes/sun/security/provider/SHA3.java line 73:
>>
>>> 71: // The following array is allocated to size WIDTH bytes, but we only
>>> 72: // ever use the first blockSize bytes it (for bytes <-> long
>>> conver
> This PR removes some unnecessary conversions between byte arrays and long
> arrays during SHA3 digest computations.
Ferenc Rakoczi has updated the pull request incrementally with one additional
commit since the last revision:
Accept more review suggestions
-
Changes:
- all:
On Fri, 14 Jun 2024 05:56:05 GMT, Andrey Turbanov wrote:
>> Ferenc Rakoczi has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix clone(), accept review suggestions.
>
> src/java.base/share/classes/sun/security/provider/SHA3.java line 152:
On Thu, 13 Jun 2024 20:25:22 GMT, Valerie Peng wrote:
>> Ferenc Rakoczi has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix clone(), accept review suggestions.
>
> src/java.base/share/classes/sun/security/provider/SHA3.java line 73:
>
>
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Wed, 12 Jun 2024 20:04:40 GMT, Ferenc Rakoczi wrote:
> tier1,2,3 mach5 tests all passed.
Thank you for testing.
-
PR Comment: https://git.openjdk.org/jdk/pull/19632#issuecomment-2163863932
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Ferenc Rakoczi has updated the pull request incrementally with one additional
> commit since the last revision:
>
On Tue, 11 Jun 2024 18:21:49 GMT, Daniel Jeliński wrote:
>> okay
>
> Could you try using MethodHandles instead of b2lLittle? Similar to what's
> used in ChaCha20:
> https://github.com/openjdk/jdk/blob/b77bd5fd6a6f7ddbed90300fba790da4fb683275/src/java.base/share/classes/com/sun/crypto/provider/Ch
> This PR removes some unnecessary conversions between byte arrays and long
> arrays during SHA3 digest computations.
Ferenc Rakoczi has updated the pull request incrementally with one additional
commit since the last revision:
Fix clone(), accept review suggestions.
-
Changes:
On Tue, 11 Jun 2024 18:18:41 GMT, Daniel Jeliński 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[
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi 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];
>
On Tue, 11 Jun 2024 17:39:29 GMT, Vladimir Kozlov wrote:
>> There is no other use.. That array is there for the sole purpose of holding
>> the input as a long array before it gets xor-ed into the state.
>
> okay
Could you try using MethodHandles instead of b2lLittle? Similar to what's used
in
On Tue, 11 Jun 2024 09:55:11 GMT, Ferenc Rakoczi wrote:
>> This PR removes some unnecessary conversions between byte arrays and long
>> arrays during SHA3 digest computations.
>
> Some microbenchmark data (the percentages are improvements in ops/sec):
> Benchmark
On Tue, 11 Jun 2024 17:30:37 GMT, Ferenc Rakoczi wrote:
>> Thank you for explanation.
>>
>> An other question. Is any other use of `longBuf` array after
>> `implCompress0()` call which load values from it? Because Intrinsic code
>> will not update it.
>
> There is no other use.. That array is
On Tue, 11 Jun 2024 15:53:33 GMT, Vladimir Kozlov wrote:
>> Oh, and about the length: buffer is allocated in the constructor of the
>> parent class (DigestBase) like this:
>> buffer = new byte[blockSize];
>> Here blockSize is one of { 72, 104, 136, 144, 168 }, so divisible by 8.
>> buffer.leng
On Tue, 11 Jun 2024 08:03:48 GMT, Ferenc Rakoczi wrote:
>> Well, the intrinsic function treats the input and state as long arrays
>> anyways, and so it only works on little endian architectures, where the
>> conversion is a no-op. There is no additional array copy, this b2lLittle()
>> call use
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi wrote:
> This PR removes some unnecessary conversions between byte arrays and long
> arrays during SHA3 digest computations.
Some microbenchmark data (the percentages are improvements in ops/sec):
Benchmark
On Mon, 10 Jun 2024 21:09:16 GMT, Ferenc Rakoczi wrote:
>> src/java.base/share/classes/sun/security/provider/SHA3.java line 100:
>>
>>> 98: b2lLittle(b, ofs, longBuf, 0, blockSize);
>>> 99: for (int i = 0; i < blockSize / 8; i++) {
>>> 100: state[i] ^= longBuf[i];
>>
On Mon, 10 Jun 2024 18:43:49 GMT, Vladimir Kozlov 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 100:
>
>> 98: b2lLittle(b, ofs, longBuf,
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi 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 100:
> 98: b2lLittle(b, ofs, longBuf, 0, blockS
On Mon, 10 Jun 2024 17:29:31 GMT, Ferenc Rakoczi wrote:
>> src/java.base/share/classes/sun/security/provider/SHA3.java line 98:
>>
>>> 96: @IntrinsicCandidate
>>> 97: private void implCompress0(byte[] b, int ofs) {
>>> 98: b2lLittle(b, ofs, longBuf, 0, blockSize);
>>
>> What abo
On Mon, 10 Jun 2024 17:25:21 GMT, Vladimir Kozlov 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 98:
>
>> 96: @IntrinsicCandidate
>> 97: p
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi 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 98:
> 96: @IntrinsicCandidate
> 97: private voi
This PR removes some unnecessary conversions between byte arrays and long
arrays during SHA3 digest computations.
-
Commit messages:
- 8333867: SHA3 performance can be improved
Changes: https://git.openjdk.org/jdk/pull/19632/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=
29 matches
Mail list logo