
#13346: Run nofib with -fspec-constr-keen -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Increased allocations could be due to reboxing as described in section 6.1 of the original paper. In a few experiments, it does seem that flag causes quite aggressive optimisation in the case of static arguments. For example: {{{ main = drop 2 [1,2,3] }}} leads to {{{ -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.main1 :: Integer [GblId, Caf=NoCafRefs, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] Foo.main1 = 3 -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} main :: [Integer] [GblId, Caf=NoCafRefs, Str=m2, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] main = GHC.Types.: @ Integer Foo.main1 (GHC.Types.[] @ Integer) }}} Notice that `drop` has been fully evaluated even though it is self- recursive. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13346#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler