summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/plotbench
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-23 13:21:21 +0100
committerTyge Løvset <[email protected]>2021-12-23 13:21:21 +0100
commitde411007bceda17457fb27ea72b4433adf744797 (patch)
tree9007e2accfcf4bfdb0347554f3ff671b47c610ed /benchmarks/plotbench
parenta7b11c557e89dfe6314dd07ea558359071da0f92 (diff)
downloadSTC-modified-de411007bceda17457fb27ea72b4433adf744797.tar.gz
STC-modified-de411007bceda17457fb27ea72b4433adf744797.zip
Removed emplace functions if not i_valraw or i_keyraw is defined. Safety/optimize measure.
Diffstat (limited to 'benchmarks/plotbench')
-rw-r--r--benchmarks/plotbench/cmap_benchmark.cpp8
-rw-r--r--benchmarks/plotbench/csmap_benchmark.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/benchmarks/plotbench/cmap_benchmark.cpp b/benchmarks/plotbench/cmap_benchmark.cpp
index 16aec8c0..d8d1c6ab 100644
--- a/benchmarks/plotbench/cmap_benchmark.cpp
+++ b/benchmarks/plotbench/cmap_benchmark.cpp
@@ -73,8 +73,8 @@ Sample test_stc_unordered_map() {
stc64_srandom(seed);
s.test[INSERT].t1 = clock();
container con = cmap_x_init();
- c_forrange (i, N/2) cmap_x_emplace(&con, stc64_random() & mask1, i);
- c_forrange (i, N/2) cmap_x_emplace(&con, i, i);
+ c_forrange (i, N/2) cmap_x_insert(&con, stc64_random() & mask1, i);
+ c_forrange (i, N/2) cmap_x_insert(&con, i, i);
s.test[INSERT].t2 = clock();
s.test[INSERT].sum = cmap_x_size(con);
stc64_srandom(seed);
@@ -86,8 +86,8 @@ Sample test_stc_unordered_map() {
}{
container con = cmap_x_init();
stc64_srandom(seed);
- c_forrange (i, N/2) cmap_x_emplace(&con, stc64_random() & mask1, i);
- c_forrange (i, N/2) cmap_x_emplace(&con, i, i);
+ c_forrange (i, N/2) cmap_x_insert(&con, stc64_random() & mask1, i);
+ c_forrange (i, N/2) cmap_x_insert(&con, i, i);
stc64_srandom(seed);
s.test[FIND].t1 = clock();
size_t sum = 0;
diff --git a/benchmarks/plotbench/csmap_benchmark.cpp b/benchmarks/plotbench/csmap_benchmark.cpp
index 4d1621e3..e7603b58 100644
--- a/benchmarks/plotbench/csmap_benchmark.cpp
+++ b/benchmarks/plotbench/csmap_benchmark.cpp
@@ -73,8 +73,8 @@ Sample test_stc_map() {
stc64_srandom(seed);
s.test[INSERT].t1 = clock();
container con = csmap_x_init();
- c_forrange (i, N/2) csmap_x_emplace(&con, stc64_random() & mask1, i);
- c_forrange (i, N/2) csmap_x_emplace(&con, i, i);
+ c_forrange (i, N/2) csmap_x_insert(&con, stc64_random() & mask1, i);
+ c_forrange (i, N/2) csmap_x_insert(&con, i, i);
s.test[INSERT].t2 = clock();
s.test[INSERT].sum = csmap_x_size(con);
stc64_srandom(seed);
@@ -86,8 +86,8 @@ Sample test_stc_map() {
}{
container con = csmap_x_init();
stc64_srandom(seed);
- c_forrange (i, N/2) csmap_x_emplace(&con, stc64_random() & mask1, i);
- c_forrange (i, N/2) csmap_x_emplace(&con, i, i);
+ c_forrange (i, N/2) csmap_x_insert(&con, stc64_random() & mask1, i);
+ c_forrange (i, N/2) csmap_x_insert(&con, i, i);
stc64_srandom(seed);
s.test[FIND].t1 = clock();
size_t sum = 0;