aboutsummaryrefslogtreecommitdiff
path: root/tests/bench
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench')
-rw-r--r--tests/bench/README.md5
-rw-r--r--tests/bench/bench.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/bench/README.md b/tests/bench/README.md
index 21beee1..2890059 100644
--- a/tests/bench/README.md
+++ b/tests/bench/README.md
@@ -22,6 +22,7 @@ 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`.
* `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
@@ -66,7 +67,7 @@ gcc (Debian 12.2.0-14) 12.2.0
# benchmark with 100k trials
> ./bench
info: cpucycles: version=20240318 implementation=amd64-pmc persecond=4800000000
-info: num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32
+info: backend=avx512 num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32
function,dst_len,64,256,1024,4096,16384
sha3_224,28,15.4,7.8,7.8,7.1,7.0
sha3_256,32,15.4,7.8,7.8,7.6,7.4
@@ -91,7 +92,7 @@ gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
# benchmark with 100k trials
> ./bench
info: cpucycles: version=20240318 implementation=arm64-vct persecond=1800000000
-info: num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32
+info: backend=scalar num_trials=100000 src_lens=64,256,1024,4096,16384 dst_lens=32
function,dst_len,64,256,1024,4096,16384
sha3_224,28,32.8,15.8,15.2,13.7,13.5
sha3_256,32,32.8,15.8,15.1,14.5,14.1
diff --git a/tests/bench/bench.c b/tests/bench/bench.c
index cd03205..972a185 100644
--- a/tests/bench/bench.c
+++ b/tests/bench/bench.c
@@ -200,7 +200,7 @@ int main(int argc, char *argv[]) {
}
// print metadata to stderr
- fprintf(stderr,"info: cpucycles: version=%s implementation=%s persecond=%lld\ninfo: num_trials=%zu src_lens", cpucycles_version(), cpucycles_implementation(), cpucycles_persecond(), num_trials);
+ fprintf(stderr,"info: cpucycles: version=%s implementation=%s persecond=%lld\ninfo: backend=%s num_trials=%zu src_lens", cpucycles_version(), cpucycles_implementation(), cpucycles_persecond(), sha3_backend(), num_trials);
for (size_t i = 0; i < NUM_SRC_LENS; i++) {
fprintf(stderr, "%s%zu", (i > 0) ? "," : "=", SRC_LENS[i]);
}