diff options
| author | Tyge Løvset <[email protected]> | 2021-10-02 11:35:45 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-10-02 11:35:45 +0200 |
| commit | c952b72df544e5d4cb555140f4d0c3f251444b45 (patch) | |
| tree | eb450502f5313af5cea7f52450193c08ac2aad17 /benchmarks/cmap_benchmark.cpp | |
| parent | 09a07970445dc34b986b1836679616ab8de81792 (diff) | |
| download | STC-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.cpp | 6 |
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();
|
