[GHC] #9345: Data.List.inits is extremely slow
GHC
ghc-devs at haskell.org
Mon Sep 1 20:29:08 UTC 2014
#9345: Data.List.inits is extremely slow
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.8.4
Component: | Version: 7.8.3
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1
Unknown/Multiple | hour)
Type of failure: Runtime | Blocked By:
performance bug | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by nomeata):
> This doesn't seem to affect the problem, however.
Yes, I don’t think the problem in this particular case lies with init per
se. I think it’s more like concat, but only when part of the recursion
(the `c` above) is not inlined. That might also be what you observe.
> I am curious if there is a way to manually force whatever's getting the
wrong arity to get the right one
Not with list fusion as we have it right now, I think. It should work with
https://github.com/takano-akio/ww-fusion (which I should follow up on
again).
I don’t think a rule for `concat (inits)` is worth it, but it may help us
understand the problem better.
I wonder if maybe the rule for `concat` can be rewritten so that the
resulting recursion is nicer, but I don’t see it right now (but I’m too
jetlagged to think anyways).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9345#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list