[GHC] #8766: length [Integer] is twice as slow but length [Int] is 10 times faster
GHC
ghc-devs at haskell.org
Thu Feb 13 23:47:48 UTC 2014
#8766: length [Integer] is twice as slow but length [Int] is 10 times faster
--------------------------------------------+------------------------------
Reporter: George | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.1-rc1
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 George):
Right, the important point of the ticket is the regression for [Integer]
but implicit in mentioning the order of magnitude improvement for [Int] is
the question of why [Integer] is, even after this bug is fixed, an order
of magnitude slower than [Int] and would it be possible to make the time
for [Integer] much closer to [Int]. After all length only traverses the
spine of the list so why the big difference? This is probably obvious to
many but not to me and I'd like to know why.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8766#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list