Skip to content

Commit

Permalink
Add a 1,000,000 element sort test to sort_benchmark. Remove duplica…
Browse files Browse the repository at this point in the history
…tion in setting range sizes.
  • Loading branch information
davidstone committed Jan 26, 2025
1 parent 8fe2b70 commit 59f7300
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/containers/test/sort/sort_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ using containers::chunked_insertion_sort;
using containers::new_sort;
using containers::sort;

#define BENCHMARK_SIZES DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128)->Arg(1'000'000)

#define BENCHMARK_ALL(data_size) \
BENCHMARK(benchmark_sort<data_size, insertion_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
BENCHMARK(benchmark_sort<data_size, chunked_insertion_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
BENCHMARK(benchmark_sort<data_size, new_sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128); \
BENCHMARK(benchmark_sort<data_size, sort>)->DenseRange(1, 5, 1)->Arg(16)->Arg(25)->Arg(64)->Arg(128)
BENCHMARK(benchmark_sort<data_size, insertion_sort>)->BENCHMARK_SIZES; \
BENCHMARK(benchmark_sort<data_size, chunked_insertion_sort>)->BENCHMARK_SIZES; \
BENCHMARK(benchmark_sort<data_size, new_sort>)->BENCHMARK_SIZES; \
BENCHMARK(benchmark_sort<data_size, sort>)->BENCHMARK_SIZES

BENCHMARK_ALL(1);
BENCHMARK_ALL(4);
Expand Down

0 comments on commit 59f7300

Please sign in to comment.