summaryrefslogtreecommitdiffhomepage
path: root/examples/benchmark.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-16 10:58:04 +0100
committerTyge Løvset <[email protected]>2020-12-16 10:58:04 +0100
commita147a1be246472d079f72fc22e065080d1588e29 (patch)
treed01c8965999f86cd46a51cf6ac3e2920adb238a0 /examples/benchmark.cpp
parent12d7c1b3ca437af8734acc8e7cbfdba08b8c36df (diff)
downloadSTC-modified-a147a1be246472d079f72fc22e065080d1588e29.tar.gz
STC-modified-a147a1be246472d079f72fc22e065080d1588e29.zip
Reverted back API to easier naming scheme of crandom.h types and methods.
Highly optimized generation of unbiased uniform bounded random numbers. Only 33% overhead.
Diffstat (limited to 'examples/benchmark.cpp')
-rw-r--r--examples/benchmark.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/benchmark.cpp b/examples/benchmark.cpp
index 4830c9ba..206da5ce 100644
--- a/examples/benchmark.cpp
+++ b/examples/benchmark.cpp
@@ -28,9 +28,9 @@ KHASH_MAP_INIT_INT64(ii, int64_t)
size_t seed;
static const float max_load_factor = 0.77f;
-cstc64_t rng;
-#define SEED(s) rng = cstc64_init(seed)
-#define RAND(N) (cstc64_rand(&rng) & ((1 << N) - 1))
+crand_t rng;
+#define SEED(s) rng = crand_init(seed)
+#define RAND(N) (crand_next(&rng) & ((1 << N) - 1))
#define CMAP_SETUP(X, Key, Value) cmap_##X map = cmap_inits \