aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2024-05-27 09:07:05 -0400
committerPaul Duncan <pabs@pablotron.org>2024-05-27 09:07:05 -0400
commit95533b83e5e8ee0445dc69539eafa634686ea947 (patch)
tree572630fcd0b349f11c298d821e2faf7a62d566fb /tests
parentf8b52bfb1fbccd32a9e45d113f32940c2f53add2 (diff)
downloadsha3-95533b83e5e8ee0445dc69539eafa634686ea947.tar.bz2
sha3-95533b83e5e8ee0445dc69539eafa634686ea947.zip
tests/bench: add k12_once to list of functions and add 32k test column
Diffstat (limited to 'tests')
-rw-r--r--tests/bench/README.md8
-rw-r--r--tests/bench/bench.c7
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/bench/README.md b/tests/bench/README.md
index 7e69817..dca2431 100644
--- a/tests/bench/README.md
+++ b/tests/bench/README.md
@@ -19,10 +19,10 @@ The columns of the [CSV][] printed to standard output are as follows:
The metadata printed to standard error is as follows:
-* `version`: version of [libcpucycles][] as reported by `cpucycles_version()`
-* `implementation`: [libcpucycles][] backend as reported by `cpucycles_implementation()`
-* `persecond`: CPU cycles per second, as reported by `cpucycles_persecond()`
-* `backend`: Name of backend. One of `avx512` or `scalar`.
+* `version`: version of [libcpucycles][] as reported by `cpucycles_version()`.
+* `implementation`: [libcpucycles][] backend as reported by `cpucycles_implementation()`.
+* `persecond`: CPU cycles per second, as reported by `cpucycles_persecond()`.
+* `backend`: Backend name. One of: `avx512`, `avx2`, `neon`, or `scalar`.
* `num_trials`: Number of trials.
* `src_lens`: Comma-delimited list of input messages lengths, in bytes.
* `dst_lens`: Comma-delimited list of output digest lengths, in bytes
diff --git a/tests/bench/bench.c b/tests/bench/bench.c
index 7c7598c..5873ef6 100644
--- a/tests/bench/bench.c
+++ b/tests/bench/bench.c
@@ -25,7 +25,7 @@
#define NUM_TRIALS 2000
// input sizes (used for hashes and xofs)
-static const size_t SRC_LENS[] = { 64, 256, 1024, 4096, 16384 };
+static const size_t SRC_LENS[] = { 64, 256, 1024, 4096, 16384, 32768 };
#define NUM_SRC_LENS (sizeof(SRC_LENS)/sizeof(SRC_LENS[0]))
// output sizes (used for xofs)
@@ -172,6 +172,7 @@ static stats_t get_stats(long long * const vals, const size_t num_vals, const si
// define xof benchmarks
DEF_BENCH_XOF(shake128)
DEF_BENCH_XOF(shake256)
+DEF_BENCH_XOF(k12_once)
// define hash benchmarks
DEF_BENCH_HASH(sha3_224, 28)
@@ -244,6 +245,10 @@ int main(int argc, char *argv[]) {
// shake256
bench_shake256(cpbs, num_trials, dst_len);
print_row("shake256", dst_len, cpbs);
+
+ // kangarootwelve
+ bench_k12_once(cpbs, num_trials, dst_len);
+ print_row("k12_once", dst_len, cpbs);
}
// return success