[GHC] #9623: Use Data.List.dropWhileEnd
GHC
ghc-devs at haskell.org
Thu Sep 25 17:07:03 UTC 2014
#9623: Use Data.List.dropWhileEnd
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner:
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: libraries | Version: 7.8.3
(other) | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Easy (less than 1
Unknown/Multiple | hour)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Criterion has spoken. `dropWhileEnd isSpace` seems to be much slower in
typical cases than even `reverse . dropWhile isSpace . reverse`. Even a
faster predicate, `(== ' ')`, gives a (much smaller) disadvantage to
`dropWhileEnd`.
However, the above `dropWhileEndLE` appears to be faster than the double
reverse in all cases. So I'll add it to the utilities module and use that
instead.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9623#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list