Skip to content

Commit 4c7c11f

Browse files
committed
Benchmark alignment issue documentation.
1 parent a89c008 commit 4c7c11f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/benchmark/benchmark.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
#include "format_bin.hpp"
66

7+
// It seems that there is a "threshold" to the amount of functions being
8+
// benchmarked. Having "too many" of them makes them become slow(er). This
9+
// appears to be due to code alignment. See similar issue and video referencing
10+
// that issue:
11+
//
12+
// * https://github.com/google/benchmark/issues/461
13+
// * https://www.youtube.com/watch?v=10MQW-aJU3g&t=197s
14+
//
15+
// Having split up many of the benchmarks into different executables solved it
16+
// for a while, but the problem came back for bm_pico_kd_tree. For now,
17+
// benchmarks are just enabled 1-by-1.
18+
719
namespace pico_tree {
820

921
class Benchmark : public benchmark::Fixture {

0 commit comments

Comments
 (0)