diff options
| author | Tyge Løvset <[email protected]> | 2022-09-26 08:08:47 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-26 08:08:47 +0200 |
| commit | ca01dd726e2ed8f8b69f8ff08855e80f4eea7247 (patch) | |
| tree | 0ce1594c39d18a93212f066fd8c3c2477fc6f22b /benchmarks/plotbench/cpque_benchmark.cpp | |
| parent | ad5be4349232bbba96c0974bc2693ec7331c4b12 (diff) | |
| download | STC-modified-ca01dd726e2ed8f8b69f8ff08855e80f4eea7247.tar.gz STC-modified-ca01dd726e2ed8f8b69f8ff08855e80f4eea7247.zip | |
DEPRECATED: c_forrange(): replaced with c_forloop(). This uses 'long long' as iter type, i.e. "%lld" printf format.
crange_from() renamed to crange_make().
More docs.
Diffstat (limited to 'benchmarks/plotbench/cpque_benchmark.cpp')
| -rw-r--r-- | benchmarks/plotbench/cpque_benchmark.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/benchmarks/plotbench/cpque_benchmark.cpp b/benchmarks/plotbench/cpque_benchmark.cpp index ca28082b..1290e3b3 100644 --- a/benchmarks/plotbench/cpque_benchmark.cpp +++ b/benchmarks/plotbench/cpque_benchmark.cpp @@ -20,14 +20,14 @@ void std_test() std::priority_queue<float, std::vector<float>, std::greater<float>> pq; rng = stc64_new(seed); clock_t start = clock(); - c_forrange (i, N) + c_forloop (i, N) pq.push((float) stc64_randf(&rng)*100000); printf("Built priority queue: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC); printf("%g ", pq.top()); start = clock(); - c_forrange (i, N) { + c_forloop (i, N) { pq.pop(); } @@ -44,18 +44,18 @@ void stc_test() { rng = stc64_new(seed); clock_t start = clock(); - c_forrange (i, N) + c_forloop (i, N) cpque_f_push(&pq, (float) stc64_randf(&rng)*100000); printf("Built priority queue: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC); printf("%g ", *cpque_f_top(&pq)); - c_forrange (i, int, M) { + c_forloop (i, M) { cpque_f_pop(&pq); } start = clock(); - c_forrange (i, int, M, N) + c_forloop (i, M, N) cpque_f_pop(&pq); printf("\npopped PQ: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC); } |
