[GHC] #8763: forM_ [1..N] does not get fused (10 times slower than go function)
GHC
ghc-devs at haskell.org
Wed Feb 12 10:52:38 UTC 2014
#8763: forM_ [1..N] does not get fused (10 times slower than go function)
--------------------------------------------+------------------------------
Reporter: nh2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by nomeata):
It turns out that this comment is obsolete; the flag is never set. I quote
from `SimplCore`
{{{
-- Was: gentleFloatOutSwitches
--
-- I have no idea why, but not floating constants to
-- top level is very bad in some cases.
--
-- Notably: p_ident in spectral/rewrite
-- Changing from "gentle" to "constantsOnly"
-- improved rewrite's allocation by 19%, and
-- made 0.0% difference to any other nofib
-- benchmark
}}}
This comment was introduced in eaeca51efc0be3ff865c4530137bfbe9f8553549
(2009) by SPJ.
Maybe rules matching should look though unfoldings more easily (at the
risk of losing sharing)? There is no point in worrying about sharing
`[0..N]` in a rule application whose purpose is to eliminate that list.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8763#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list