On Wed, 23 Nov 2022 23:33:32 GMT, Volodymyr Paprotski <d...@openjdk.org> wrote:

> There is now an intrinsic for Poly1305, which is only enabled on the 
> `engineUpdate([]byte)` path. This PR adds intrinsic support 
> `engineUpdate(ByteBuffer)` (when the bytebuffer `hasArray`).
> 
> Fuzzing test expanded to also include ByteBuffer payloads.
> 
> Performance is now matched:
> 
> Benchmark                         (dataSize)  (provider)   Mode  Cnt        
> Score        Error  Units
> Poly1305DigestBench.digestBuffer          64              thrpt    3  
> 3320909.857 ± 787300.545  ops/s
> Poly1305DigestBench.digestBuffer         256              thrpt    3  
> 3006447.324 ± 704790.796  ops/s
> Poly1305DigestBench.digestBuffer        1024              thrpt    3  
> 2645041.509 ± 664904.622  ops/s
> Poly1305DigestBench.digestBuffer       16384              thrpt    3   
> 893389.209 ±   6288.743  ops/s
> Poly1305DigestBench.digestBuffer     1048576              thrpt    3    
> 14932.680 ±    170.238  ops/s
> Poly1305DigestBench.digestBytes           64              thrpt    3  
> 3548298.515 ± 859964.530  ops/s
> Poly1305DigestBench.digestBytes          256              thrpt    3  
> 3083261.994 ± 141802.417  ops/s
> Poly1305DigestBench.digestBytes         1024              thrpt    3  
> 2704357.584 ± 554683.019  ops/s
> Poly1305DigestBench.digestBytes        16384              thrpt    3   
> 898913.339 ±  99733.295  ops/s
> Poly1305DigestBench.digestBytes      1048576              thrpt    3    
> 14961.872 ±     38.003  ops/s
> Finished running test 
> 'micro:org.openjdk.bench.javax.crypto.full.Poly1305DigestBench'
> 
> Relates to:
> - https://github.com/openjdk/jdk/pull/11463: Found inconsistency between 
> processing `[]byte` and `ByteBuffer`. When that one is fixed, 
> `Poly1305IntrinsicFuzzTest.java` should not be setting the endianness on the 
> `ByteBuffer`
> - Intrinsic introduced by https://github.com/openjdk/jdk/pull/10582.

This pull request has now been integrated.

Changeset: 203251ff
Author:    Volodymyr Paprotski <volodymyr.paprot...@intel.com>
Committer: Sandhya Viswanathan <sviswanat...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/203251ffc0ea8b9bb9c8b95c50434e4185020d84
Stats:     86 lines in 3 files changed: 67 ins; 3 del; 16 mod

8297379: Enable the ByteBuffer path of Poly1305 optimizations

Reviewed-by: sviswanathan, ascarpino, jnimeh

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

PR: https://git.openjdk.org/jdk/pull/11338

Reply via email to