[GHC] #1473: isSpace is too slow
GHC
ghc-devs at haskell.org
Wed Oct 1 09:45:04 UTC 2014
#1473: isSpace is too slow
-------------------------------------+-------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: ⊥
Component: | Version: 6.6.1
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by dfeuer):
* cc: hvr, ekmett (added)
Comment:
I wrote up a whole long comment here, but then TRAC timed me out and I
lost it. The gist of it is that I don't think we should be using
`iswspace` here at all, because Haskell 2010's
[https://www.haskell.org/onlinereport/haskell2010/haskellch16.html
specification of `isSpace`] appears to be intended to match
[http://www.unicode.org/Public/6.3.0/ucd/PropList.txt the Unicode concept
of whitespace], which does not seem to match the locale-specific
[http://pubs.opengroup.org/onlinepubs/009695399/functions/iswspace.html
definition of `iswspace`]. As I discussed with Carter, we can probably
improve the performance of `isSpace` by using something like Yitzchak
Gale's implementation modified to cut down the number of branches (since
many of them will be mispredicted).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1473#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list