]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qht-bench.c
qht-bench: add -p flag to precompute hash values
authorEmilio G. Cota <cota@braap.org>
Mon, 10 Sep 2018 18:31:54 +0000 (14:31 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 26 Sep 2018 15:55:54 +0000 (08:55 -0700)
commitbd224fce6017133733fee560ad8e5f737ad8b062
tree21d08f3cb50fc5e6aed886b9f9ac0dba85fb1cd7
parent1911c8a3bd550c79339863672ddcf5dbc48d3c16
qht-bench: add -p flag to precompute hash values

Precomputing the hash values allows us to perform more frequent
accesses to the hash table, thereby reaching higher throughputs.

We keep the old behaviour by default, since (1) we might confuse
users if they measured a speedup without changing anything in
the QHT implementation, and (2) benchmarking the hash function
"on line" is also valuable.

Before:
$ taskset -c 0 tests/qht-bench -n 1
 Throughput:        38.18 MT/s

After:
$ taskset -c 0 tests/qht-bench -n 1
 Throughput:        38.16 MT/s

After (with precomputing):
$ taskset -c 0 tests/qht-bench -n 1 -p
 Throughput:        50.87 MT/s

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tests/qht-bench.c