diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-06-02 07:27:59 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-06-02 07:27:59 +0200 |
commit | d420aa762c4eb64fcd9b89096f2e7312090f8fac (patch) | |
tree | d9c3de21019d03b3f1ca9638d7c0c83225b1a907 | |
parent | d55fc19dfcb6b6766fbe05292d0c62f380bec439 (diff) | |
download | nettle-d420aa762c4eb64fcd9b89096f2e7312090f8fac.tar.gz |
Delete benchmark code attempting to measure function call overhead.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | examples/nettle-benchmark.c | 18 |
2 files changed, 8 insertions, 18 deletions
@@ -1,3 +1,11 @@ +2020-06-02 Niels Möller <nisse@lysator.liu.se> + + * examples/nettle-benchmark.c (main): Delete call to + time_overhead. The attempt to measure function call overhead is + not very useful or accurate. The benchmarking loop is optimized + away by gcc-10, making the benchmark program hang. + (bench_nothing, time_overhead): Deleted. + 2020-04-29 Niels Möller <nisse@lysator.liu.se> * Released Nettle-3.6. diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c index 5d0e649e..69e34bfd 100644 --- a/examples/nettle-benchmark.c +++ b/examples/nettle-benchmark.c @@ -152,12 +152,6 @@ time_function(void (*f)(void *arg), void *arg) return elapsed / ncalls - overhead; } -static void -bench_nothing(void *arg UNUSED) -{ - return; -} - struct bench_memxor_info { void *dst; @@ -333,17 +327,6 @@ xalloc(size_t size) return p; } -static void -time_overhead(void) -{ - overhead = time_function(bench_nothing, NULL); - printf("benchmark call overhead: %7f us", overhead * 1e6); - if (frequency > 0.0) - printf("%7.2f cycles\n", overhead * frequency); - printf("\n"); -} - - static void time_memxor(void) @@ -991,7 +974,6 @@ main(int argc, char **argv) bench_salsa20_core(); bench_sha3_permute(); printf("\n"); - time_overhead(); header(); |