Improving Data.Char.isSpace performance

Patrick Palka patrick at parcs.ath.cx
Thu Nov 1 04:49:10 CET 2012


On Wed, Oct 31, 2012 at 10:39 PM, wren ng thornton <wren at freegeek.org>wrote:

> The one thing I worry about using \x1680 as the threshold[1] is that I'm
> not sure whether every character below \x1680 has been allocated or whether
> some are still free. If any of them are free, then this will become
> incorrect in subsequent versions of Unicode so it's a maintenance timebomb.
> (Whereas if they're all specified then it should be fine.) Can someone
> verify that using \x1680 is sound in this manner?
>

According to GHCi:

Prelude Data.Char> length $ filter ((== NotAssigned) . generalCategory)
> ['\0'..'\x1680']
> 830
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121031/7c60841d/attachment.htm>


More information about the Libraries mailing list