From 95533b83e5e8ee0445dc69539eafa634686ea947 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 27 May 2024 09:07:05 -0400 Subject: tests/bench: add k12_once to list of functions and add 32k test column --- tests/bench/README.md | 8 ++++---- tests/bench/bench.c | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/bench') 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 -- cgit v1.2.3