[GHC] #2159: Use a more efficient representation than [DynFlag]
GHC
trac at galois.com
Sat Mar 15 14:13:57 EDT 2008
#2159: Use a more efficient representation than [DynFlag]
---------------------------------------------+------------------------------
Reporter: igloo | Owner:
Type: compile-time performance bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.8.2
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown | Os: Unknown
---------------------------------------------+------------------------------
In `compiler/typecheck/TcRnMonad.lhs`, if I replace the existing
definitions with
{{{
traceOptIf _ _ = return ()
traceOptTcRn _ _ = return ()
dumpTcRn _ = return ()
}}}
then we see an improvement in nofib's "Compile Times" sections:
{{{
-1 s.d. ----- -8.5%
+1 s.d. ----- +1.8%
Average ----- -3.5%
}}}
By using some sort of bitmap representation, we ought to see a modest
compile time improvement from all the checks that the trace functions
make, as well as various other checks that are made (do we need to warn
about missing sigs, are overlapping instances allowed, etc).
The tricky bit is designing it so that it is hard to shoot yourself in the
foot. `Lexer.x` already has a bitmap (`genericsBit`, `ffiBit` etc) but the
mapping of feature to bit number is done by hand, which isn't ideal.
Perhaps this is even important enough to deserve a language extension?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2159>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list