[GHC] #14208: Performance with O0 is much better than the default or with -O2, runghc performs the best
GHC
ghc-devs at haskell.org
Mon Sep 11 03:23:23 UTC 2017
#14208: Performance with O0 is much better than the default or with -O2, runghc
performs the best
-------------------------------------+-------------------------------------
Reporter: harendra | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by harendra):
It was hard to find in the manual the difference between O0 and the
default. The manual says "O0 is the default", which seems to be incorrect
(NEED TO BE FIXED). So I had to turn to the GHC code. Alright, so O0 seems
to ignore or omit "interface-pragmas" whatever the heck they are, from
DynFlags.hs:
{{{#!hs
, ([0], Opt_IgnoreInterfacePragmas)
, ([0], Opt_OmitInterfacePragmas)
}}}
When I used "-fignore-interface-pragmas" I got the same improvement in
performance. The GHC manual documents this flag but says nothing about
what this really means (NEED TO BE FIXED). I can only guess. Since this
has to do something with the interface, this also explains why the
performance is good when the whole code is in the same module and bad when
the code is split into two modules.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14208#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list