From c4c903bb0cd9db33e1af0872b0b438f7da489c3c Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 5 Feb 2021 23:34:35 +0100 Subject: Yet another bug in csmap.h fixed. SHould be good now. --- benchmarks/csmap_benchmark2.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'benchmarks/csmap_benchmark2.cpp') diff --git a/benchmarks/csmap_benchmark2.cpp b/benchmarks/csmap_benchmark2.cpp index 4ff1d903..5ef23862 100644 --- a/benchmarks/csmap_benchmark2.cpp +++ b/benchmarks/csmap_benchmark2.cpp @@ -62,11 +62,10 @@ static void insert_i(picobench::state& s) size_t result = 0; MapInt map; stc64_srandom(seed); - s.start_timer(); + picobench::scope scope(s); c_forrange (n, s.iterations()) map.emplace(stc64_random() & 0xfffffff, n); s.set_result(map.size()); - s.stop_timer(); } static void insert_csmap_i(picobench::state& s) @@ -74,17 +73,16 @@ static void insert_csmap_i(picobench::state& s) size_t result = 0; csmap_i map = csmap_i_init(); stc64_srandom(seed); - s.start_timer(); + picobench::scope scope(s); c_forrange (n, s.iterations()) csmap_i_emplace(&map, stc64_random() & 0xfffffff, n); s.set_result(csmap_i_size(map)); - s.stop_timer(); csmap_i_del(&map); } #define P samples(S1).iterations({N1}) -//PICOBENCH(insert_i).P; -//PICOBENCH(insert_csmap_i).P; +PICOBENCH(insert_i).P; +PICOBENCH(insert_csmap_i).P; #undef P @@ -238,8 +236,8 @@ static void ins_and_access_csmap_s(picobench::state& s) } #define P samples(S1).iterations({N1/5, N1/5, N1/5, N1/10, N1/40}).args({13, 7, 8, 100, 1000}) -//PICOBENCH(ins_and_access_s).P; -//PICOBENCH(ins_and_access_csmap_s).P; +PICOBENCH(ins_and_access_s).P; +PICOBENCH(ins_and_access_csmap_s).P; #undef P PICOBENCH_SUITE("Map5"); -- cgit v1.2.3