From fe18009bc00cfb23e348a94572a95446d6acc8b6 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 8 Apr 2018 21:07:20 +0200 Subject: [PATCH] Rewrite the loop so that the result is the same for dict and dict_oa. --- bench/bench-mlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/bench-mlib.c b/bench/bench-mlib.c index 78f6902b..b8b9e78b 100644 --- a/bench/bench-mlib.c +++ b/bench/bench-mlib.c @@ -137,8 +137,9 @@ test_dict(unsigned long n) #endif M_LET(dict, DICT_OPLIST(dict_ulong)) { for (size_t i = 0; i < n; i++) { + unsigned long value = rand_get(); unsigned long key = rand_get(); - dict_ulong_set_at(dict, key, rand_get() ); + dict_ulong_set_at(dict, key, value); } rand_init(); unsigned int s = 0;