[vector] RFR 8218750: Vectorized ChaCha20 Benchmark
Adam Petcher
adam.petcher at oracle.com
Mon Feb 11 20:58:45 UTC 2019
Webrev: https://cr.openjdk.java.net/~apetcher/8218750/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8218750
This is a benchmark based on an implementation of ChaCha20[1] on the
vector API. I added the benchmark to the existing microbenchmark project
for jdk.incubator.vector, but it is in a separate top-level package so
it doesn't interfere with the generated code. Let me know if I should
reorganize this. I've included the result of running this benchmark and
the existing (scalar) ChaCha20 benchmark on my Haswell laptop. The
128-bit vectorized implementation is a bit faster than the scalar
implementation, and at 256 bits it is over twice as fast.
[1] https://eprint.iacr.org/2013/759.pdf
Benchmark (dataSize) (keyLength) (mode) (padding) (permutation) (provider) Mode Cnt Score Error Units
CipherBench.ChaCha20.encrypt 16384 256 None NoPadding ChaCha20 thrpt 40 26890.258 ± 196.494 ops/s
Benchmark (dataSize) (vectorWidth) Mode Cnt Score Error Units
ChaChaBench.encrypt 16384 128 thrpt 8 34560.979 ± 344.393 ops/s
ChaChaBench.encrypt 16384 256 thrpt 8 60696.328 ± 587.721 ops/s
ChaChaBench.encrypt 16384 512 thrpt 8 1148.408 ± 27.487 ops/s
More information about the panama-dev
mailing list