Data.ByteString candidate 3

Ketil Malde ketil+haskell at
Wed Apr 26 07:51:57 EDT 2006

dons at (Donald Bruce Stewart) writes:

> I'd like to say that all I want to do is have the Word8 "bare metal" 
> layer, and a minimal Char8 layer layer on top

> This is what's currently implemented. 

I've now added a Latin1 module, that works like Char8, but where
packing a Char >255 is an error.  This means some extra checking,
packing 45M characters from [Char] to ByteString slows down from (very
rougly) 6.4 to 5.6 Mb/s.

Many (but probably less important) operations will be faster, checking
if c >= 256 is `elem` a Latin1 ByteString will be O(1) and always
False.  (Char8 will need to scan the string for c `mod` 256).

Feel free to grab, read, criticize, or benchmark,

     darcs get

If I haven't seen further, it is by standing in the footprints of giants

More information about the Libraries mailing list