
#8763: forM_ [1..N] does not get fused (allocates 50% more) -------------------------------------+------------------------------------- Reporter: nh2 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #7206 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by sgraf): Yes, that works and seems a lot simpler! I didn't know that `INLINE` works 'both ways', e.g. that we can prevent inlining the body into `c` this way. The only minor downside is that there might be more unidentified cases where such an `INLINE` annotation on a lambda could be beneficial. I'll prepare a patch and benchmark. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8763#comment:77 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler