summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/cdeq_benchmark.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-28 18:18:48 +0100
committerTyge Løvset <[email protected]>2020-12-28 18:18:48 +0100
commit74a75b3a8d155ea155358674d3bf8251658183a5 (patch)
tree19886986b9ce6943b826311cda40f67ebc8dd7b1 /benchmarks/cdeq_benchmark.cpp
parent83b7be31a1d0fc0be4e013dbfc97bb6cdc3600db (diff)
downloadSTC-modified-74a75b3a8d155ea155358674d3bf8251658183a5.tar.gz
STC-modified-74a75b3a8d155ea155358674d3bf8251658183a5.zip
Reverted crand.h API back to rename crand_* to stc64_*, and crand_next() -> stc64_rand().
Diffstat (limited to 'benchmarks/cdeq_benchmark.cpp')
-rw-r--r--benchmarks/cdeq_benchmark.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/benchmarks/cdeq_benchmark.cpp b/benchmarks/cdeq_benchmark.cpp
index fd01ad8b..6a376d2a 100644
--- a/benchmarks/cdeq_benchmark.cpp
+++ b/benchmarks/cdeq_benchmark.cpp
@@ -4,15 +4,15 @@
#include <stc/cdeq.h>
#include <stc/crand.h>
-enum {N = 200000000, M = 10000, P = 5000, R = 100};
+enum {N = 200000000, M = 10000, P = 5000, R = 50};
using_cdeq(i, int);
void test1() {
clock_t t1 = clock(), t2, t3;
- crand_t rng = crand_init(0);
+ stc64_t rng = stc64_init(0);
std::deque<int> deq;
for (size_t i = 1; i < N; i++) {
- deq.push_front(crand_next(&rng));
+ deq.push_front(stc64_rand(&rng));
if (i % M == 0)
for (int j = 0; j < P; j++)
deq.pop_back();
@@ -30,10 +30,10 @@ void test1() {
void test2() {
clock_t t1 = clock(), t2, t3;
- crand_t rng = crand_init(0);
+ stc64_t rng = stc64_init(0);
cdeq_i deq = cdeq_inits;
for (size_t i = 1; i < N; i++) {
- cdeq_i_push_front(&deq, crand_next(&rng));
+ cdeq_i_push_front(&deq, stc64_rand(&rng));
if (i % M == 0)
for (int j = 0; j < P; j++)
cdeq_i_pop_back(&deq);