Add header to optimizations section

This commit is contained in:
Steve Klabnik 2014-12-15 13:51:04 -05:00
parent bd3cf4c05f
commit 20fa7cbfc0

View File

@ -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