Skip to content

Commit 6a91319

Browse files
committed
fix: remove memory allocations
For some reason it slows down the overall execution of the benchmarks a lot. The time rose from 3 to 20 minutes.
1 parent e92c3e3 commit 6a91319

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

examples/google_benchmark_cmake/helper.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ NOINLINE static uint64_t recursive_fib(int n) {
1919
}
2020

2121
NOINLINE static uint64_t expensive_operation() {
22-
// Large memory allocation
23-
std::vector<uint64_t> data(1024 * 1024, 42); // 8 MiB allocation
24-
2522
// Expensive recursive computation that will dominate flamegraph
2623
uint64_t fib_result = recursive_fib(30);
2724

0 commit comments

Comments
 (0)