Do not claim that -O2 does not do better than -O
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Mar 2016 14:09:36 +0000 (16:09 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 30 Mar 2016 16:07:12 +0000 (18:07 +0200)
when in fact it does. This was pointed out by Johannes Bechberger and
supported with seemingly statistically sound evidence in his Bachelor
thesis: Of the benchmark shootout programs, 80% benefit significantly by
switchtng from -O to -O2.

See https://uqudy.serpens.uberspace.de/blog/2016/02/08/ghc-performance-over-time/
for a few raw numbers.

Differential Revision: https://phabricator.haskell.org/D2065

docs/users_guide/using-optimisation.rst

index bc8e700..5e4995d 100644 (file)
@@ -79,9 +79,6 @@ one reason to stick to no-optimisation when developing code.
     runtime or space *worse* if you're unlucky. They are normally turned
     on or off individually.
 
-    At the moment, ``-O2`` is *unlikely* to produce better code than
-    ``-O``.
-
 .. ghc-flag:: -Odph
 
     .. index::