From 20fa7cbfc0b5143f6c88e288772fc0f65610c2ec Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 15 Dec 2014 13:51:04 -0500 Subject: [PATCH] Add header to optimizations section --- src/doc/guide-testing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/guide-testing.md b/src/doc/guide-testing.md index 682c89fcc53f..60ce71dac845 100644 --- a/src/doc/guide-testing.md +++ b/src/doc/guide-testing.md @@ -503,6 +503,8 @@ Advice on writing benchmarks: * Make the code in the `iter` loop do something simple, to assist in pinpointing performance improvements (or regressions) +## Gotcha: optimizations + There's another tricky part to writing benchmarks: benchmarks compiled with optimizations activated can be dramatically changed by the optimizer so that the benchmark is no longer benchmarking what one expects. For example, the