diff options
| author | Tyge Løvset <[email protected]> | 2022-10-19 15:50:51 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-19 15:50:51 +0200 |
| commit | 0441f3844410c64b7e2d4a2604b4254b851e64c8 (patch) | |
| tree | 2b30f21536fd589b890fa4644732e963036a9113 /benchmarks/plotbench/cpque_benchmark.cpp | |
| parent | bb3a457e5c2c9e6b069ab3dfba10f9d21686b035 (diff) | |
| download | STC-modified-0441f3844410c64b7e2d4a2604b4254b851e64c8.tar.gz STC-modified-0441f3844410c64b7e2d4a2604b4254b851e64c8.zip | |
Reverted back to c_forrrange from c_forloop. Still available but deprecated.
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 1290e3b3..a729c09f 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_forloop (i, N) + c_forrange (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_forloop (i, N) { + c_forrange (i, N) { pq.pop(); } @@ -44,18 +44,18 @@ void stc_test() { rng = stc64_new(seed); clock_t start = clock(); - c_forloop (i, N) + c_forrange (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_forloop (i, M) { + c_forrange (i, M) { cpque_f_pop(&pq); } start = clock(); - c_forloop (i, M, N) + c_forrange (i, M, N) cpque_f_pop(&pq); printf("\npopped PQ: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC); } |
