Skip to content

Commit 20fa7cb

Browse files
committed
Add header to optimizations section
1 parent bd3cf4c commit 20fa7cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/doc/guide-testing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,8 @@ Advice on writing benchmarks:
503503
* Make the code in the `iter` loop do something simple, to assist in pinpointing
504504
performance improvements (or regressions)
505505

506+
## Gotcha: optimizations
507+
506508
There's another tricky part to writing benchmarks: benchmarks compiled with
507509
optimizations activated can be dramatically changed by the optimizer so that
508510
the benchmark is no longer benchmarking what one expects. For example, the

0 commit comments

Comments
 (0)