[GHC] #876: Length is not a good consumer
GHC
ghc-devs at haskell.org
Sun Dec 11 14:43:44 UTC 2016
#876: Length is not a good consumer
-------------------------------------+-------------------------------------
Reporter: ariep@… | Owner:
Type: bug | Status: new
Priority: lowest | Milestone: 7.6.2
Component: libraries/base | Version: 6.5
Resolution: | Keywords: length
Operating System: Linux | Architecture:
| Unknown/Multiple
Type of failure: Runtime | Test Case:
performance bug | perf/should_run/T876
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by George):
* status: closed => new
* resolution: fixed =>
Comment:
I believe this has regressed.
{{{
length [0..10]
11
it :: Int
(0.11 secs, 85,536 bytes)
Prelude> length [0..(10^7)]
10000001
it :: Int
(0.25 secs, 720,084,176 bytes)
Prelude>
}}}
My guess, fwiw, is that this is connected with AMP, making list an
instance of Foldable and the issue that rewrite rules cannot be applied
to class methods as discussed in recent emails between Conal and SimonPJ.
I think the current priority of lowest is correct but thought it worth
noting that the problem still exists. Also I think that the user's guide
does not accurately reflect the state of list fusion, i.e.
https://ghc.haskell.org/trac/ghc/ticket/915. The User's Guide, section
9.32.6 states "This list could readily be extended; if there are Prelude
functions that you use a lot which are not included, please tell us." As
this bug and ticket 915 indicates extending the list is not always easy. I
can file a doc bug if people would like.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/876#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list