Skip to content

Commit 59f7300

Browse files
committed
Add a 1,000,000 element sort test to sort_benchmark. Remove duplication in setting range sizes.
1 parent 8fe2b70 commit 59f7300

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/containers/test/sort/sort_benchmark.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ using containers::chunked_insertion_sort;
7373
using containers::new_sort;
7474
using containers::sort;
7575

76+
#define BENCHMARK_SIZES DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128)->Arg(1'000'000)
77+
7678
#define BENCHMARK_ALL(data_size) \
77-
BENCHMARK(benchmark_sort<data_size, insertion_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
78-
BENCHMARK(benchmark_sort<data_size, chunked_insertion_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
79-
BENCHMARK(benchmark_sort<data_size, new_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
80-
BENCHMARK(benchmark_sort<data_size, sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128)
79+
BENCHMARK(benchmark_sort<data_size, insertion_sort>)->BENCHMARK_SIZES; \
80+
BENCHMARK(benchmark_sort<data_size, chunked_insertion_sort>)->BENCHMARK_SIZES; \
81+
BENCHMARK(benchmark_sort<data_size, new_sort>)->BENCHMARK_SIZES; \
82+
BENCHMARK(benchmark_sort<data_size, sort>)->BENCHMARK_SIZES
8183

8284
BENCHMARK_ALL(1);
8385
BENCHMARK_ALL(4);

0 commit comments

Comments
 (0)