summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/cmap_benchmark.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-10-02 11:35:45 +0200
committerTyge Løvset <[email protected]>2021-10-02 11:35:45 +0200
commitc952b72df544e5d4cb555140f4d0c3f251444b45 (patch)
treeeb450502f5313af5cea7f52450193c08ac2aad17 /benchmarks/cmap_benchmark.cpp
parent09a07970445dc34b986b1836679616ab8de81792 (diff)
downloadSTC-modified-c952b72df544e5d4cb555140f4d0c3f251444b45.tar.gz
STC-modified-c952b72df544e5d4cb555140f4d0c3f251444b45.zip
Fixed benchmarks regarding cmap find bug.
Diffstat (limited to 'benchmarks/cmap_benchmark.cpp')
-rw-r--r--benchmarks/cmap_benchmark.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmarks/cmap_benchmark.cpp b/benchmarks/cmap_benchmark.cpp
index 98f90479..6e0ef325 100644
--- a/benchmarks/cmap_benchmark.cpp
+++ b/benchmarks/cmap_benchmark.cpp
@@ -91,8 +91,10 @@ Sample test_stc_unordered_map() {
stc64_srandom(seed);
s.test[FIND].t1 = clock();
size_t sum = 0;
- cmap_x_iter_t it;
- c_forrange (N) if ((it = cmap_x_find(&con, stc64_random() & mask1)).ref) sum += it.ref->second;
+ cmap_x_value_t* val;
+ c_forrange (N)
+ if ((val = cmap_x_get(&con, stc64_random() & mask1)))
+ sum += val->second;
s.test[FIND].t2 = clock();
s.test[FIND].sum = sum;
s.test[ITER].t1 = clock();