From a35859ce173f010f086b95cc5833591b609e07da Mon Sep 17 00:00:00 2001 From: Alex Guteniev Date: Tue, 21 May 2024 03:01:17 +0300 Subject: [PATCH] Use `BENCHMARK` macro for template benchmarks (#4662) --- benchmarks/src/std_copy.cpp | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/benchmarks/src/std_copy.cpp b/benchmarks/src/std_copy.cpp index a96e32e1eb..5aa07e56b4 100644 --- a/benchmarks/src/std_copy.cpp +++ b/benchmarks/src/std_copy.cpp @@ -86,38 +86,38 @@ namespace { } } // namespace -BENCHMARK_TEMPLATE(handwritten_loop, char)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(handwritten_loop_n, char)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(memcpy_call, char)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_call, char)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_n_call, char)->Range(0, 1 << 18); - -BENCHMARK_TEMPLATE(handwritten_loop, aggregate)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(handwritten_loop_n, aggregate)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(memcpy_call, aggregate)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_call, aggregate)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_n_call, aggregate)->Range(0, 1 << 18); - -BENCHMARK_TEMPLATE(handwritten_loop, non_trivial)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(handwritten_loop_n, non_trivial)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_call, non_trivial)->Range(0, 1 << 18); -BENCHMARK_TEMPLATE(std_copy_n_call, non_trivial)->Range(0, 1 << 18); - -BENCHMARK_TEMPLATE(handwritten_loop, int)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(handwritten_loop_n, int)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(memcpy_call, int)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_call, int)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_n_call, int)->Range(0, 1 << 15); - -BENCHMARK_TEMPLATE(handwritten_loop, aggregate)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(handwritten_loop_n, aggregate)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(memcpy_call, aggregate)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_call, aggregate)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_n_call, aggregate)->Range(0, 1 << 15); - -BENCHMARK_TEMPLATE(handwritten_loop, non_trivial)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(handwritten_loop_n, non_trivial)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_call, non_trivial)->Range(0, 1 << 15); -BENCHMARK_TEMPLATE(std_copy_n_call, non_trivial)->Range(0, 1 << 15); +BENCHMARK(handwritten_loop)->Range(0, 1 << 18); +BENCHMARK(handwritten_loop_n)->Range(0, 1 << 18); +BENCHMARK(memcpy_call)->Range(0, 1 << 18); +BENCHMARK(std_copy_call)->Range(0, 1 << 18); +BENCHMARK(std_copy_n_call)->Range(0, 1 << 18); + +BENCHMARK(handwritten_loop>)->Range(0, 1 << 18); +BENCHMARK(handwritten_loop_n>)->Range(0, 1 << 18); +BENCHMARK(memcpy_call>)->Range(0, 1 << 18); +BENCHMARK(std_copy_call>)->Range(0, 1 << 18); +BENCHMARK(std_copy_n_call>)->Range(0, 1 << 18); + +BENCHMARK(handwritten_loop>)->Range(0, 1 << 18); +BENCHMARK(handwritten_loop_n>)->Range(0, 1 << 18); +BENCHMARK(std_copy_call>)->Range(0, 1 << 18); +BENCHMARK(std_copy_n_call>)->Range(0, 1 << 18); + +BENCHMARK(handwritten_loop)->Range(0, 1 << 15); +BENCHMARK(handwritten_loop_n)->Range(0, 1 << 15); +BENCHMARK(memcpy_call)->Range(0, 1 << 15); +BENCHMARK(std_copy_call)->Range(0, 1 << 15); +BENCHMARK(std_copy_n_call)->Range(0, 1 << 15); + +BENCHMARK(handwritten_loop>)->Range(0, 1 << 15); +BENCHMARK(handwritten_loop_n>)->Range(0, 1 << 15); +BENCHMARK(memcpy_call>)->Range(0, 1 << 15); +BENCHMARK(std_copy_call>)->Range(0, 1 << 15); +BENCHMARK(std_copy_n_call>)->Range(0, 1 << 15); + +BENCHMARK(handwritten_loop>)->Range(0, 1 << 15); +BENCHMARK(handwritten_loop_n>)->Range(0, 1 << 15); +BENCHMARK(std_copy_call>)->Range(0, 1 << 15); +BENCHMARK(std_copy_n_call>)->Range(0, 1 << 15); BENCHMARK_MAIN();