summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/misc
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-11-03 13:28:45 +0100
committerTyge Løvset <[email protected]>2022-11-03 13:28:45 +0100
commitd1d8a9f389155c223db92d060b8fbccda58e2e53 (patch)
tree718fac6edbf34056c188fadfec63f9c15514a32c /benchmarks/misc
parenta913e030b5db2e0d0a49234a86fa39930b4ed6e9 (diff)
downloadSTC-modified-d1d8a9f389155c223db92d060b8fbccda58e2e53.tar.gz
STC-modified-d1d8a9f389155c223db92d060b8fbccda58e2e53.zip
Made cmap i_max_load_factor a compile time template parameter instead of runtime. Enables cmap to be NULL initialized. Currently only cvec/cdeq and csmap cannot be NULL initialized, but eventually they will.
Diffstat (limited to 'benchmarks/misc')
-rw-r--r--benchmarks/misc/rust_cmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmarks/misc/rust_cmap.c b/benchmarks/misc/rust_cmap.c
index 0750b182..83b7dd19 100644
--- a/benchmarks/misc/rust_cmap.c
+++ b/benchmarks/misc/rust_cmap.c
@@ -3,6 +3,7 @@
#define i_key uint64_t
#define i_val uint64_t
#define i_tag u64
+#define i_max_load_factor 0.8f
#include <stc/cmap.h>
uint64_t romu_rotl(uint64_t val, uint32_t r) {
@@ -27,7 +28,6 @@ int main()
const size_t n = 50000000,
mask = (1 << 25) - 1,
ms = CLOCKS_PER_SEC/1000;
- cmap_u64_max_load_factor(&m, 0.8);
cmap_u64_reserve(&m, n);
printf("STC cmap n = %" c_ZU ", mask = 0x%" PRIxMAX "\n", n, mask);