#2680: Type-checking performance regression
------------------------------------------+---------------------------------
Reporter: igloo | Owner:
Type: compile-time performance bug | Status: new
Priority: high | Milestone: 6.10.1
Component: Compiler (Type checker) | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown/Multiple
Os: Unknown/Multiple |
------------------------------------------+---------------------------------
Comment (by igloo):
The problem is in the creation of `ent_map` in
`iface/MkIface:mk_usage_info`. In this case, all of the `mod`s are the
same, so `extendModuleEnv_C (++) mv_map mod [occ]` builds the list of them
quadratically. Using `(flip (++))` brings the time down to a couple of
seconds. It doesn't look to me like the order of elements should be
important here, but can you confirm please?
{{{
hunk ./compiler/iface/MkIface.lhs 821
- Just mod -> extendModuleEnv_C (++) mv_map mod [occ]
+ Just mod -> extendModuleEnv_C (flip (++)) mv_map mod [occ]
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2680#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs