[web-devel] Data.Char8 (was Data.Word8

Kazu Yamamoto ( 山本和彦 ) kazu at iij.ad.jp
Mon Sep 24 07:00:57 CEST 2012


>> Anyway, my understanding from this thread is:
>> - Data.ByteString.Char8 does not have performance penalty.  So, we can
>>   use the character literal (e.g. 'H') with it for code readability.
>> - But the utility functions in Data.Char is slow because it handles
>>   Unicode. So, we need faster utility functions specialized to Char.
>> Is this correct? Should I implement the char8 library (or include
>> Data.Char8 in the word8 library)?
>> I know that Greg dislikes to have extra libraries but I think that
>> sharing utility functions is a good thing.
> Sounds correct to me. The only thing that's needed as far as I can tell is
> specialized-to-ascii toUpper and toLower.

I added Data.Char8 to the word8 library and released word8 v0.0.1. To
my tiny benchmark, toLower of Data.Char8 is 5x faster than that of

Is this fast enough? If you are interested in, please review the code
or measure performance. Its repo is:



More information about the web-devel mailing list