[Haskell-cafe] Re: String vs ByteString

Daniel Fischer daniel.is.fischer at web.de
Sun Aug 15 14:39:24 EDT 2010


On Sunday 15 August 2010 20:04:01, Bryan O'Sullivan wrote:
> On Sat, Aug 14, 2010 at 6:05 PM, Bryan O'Sullivan 
<bos at serpentine.com>wrote:
> >    - If it's not good enough, and the fault lies in a library you
> > chose, report a bug and provide a test case.
> >
> As a case in point, I took the string search benchmark that Daniel shared
> on Friday, and boiled it down to a simple test case: how long does it
> take to read a 31MB file?
>
> GNU wc -m:
>
>    - en_US.UTF-8: 0.701s
>
> text 0.7.1.0:
>
>    - lazy text: 1.959s
>    - strict text: 3.527s
>
> darcs HEAD:
>
>    - lazy text: 0.749s
>    - strict text: 0.927s

That's great. If that performance difference is a show stopper, one 
shouldn't go higher-level than C anyway :)
(doesn't mean one should stop thinking about further speed-up, though)

Out of curiosity, what kind of speed-up did your Friday fix bring to the 
searching/replacing functions?



More information about the Haskell-Cafe mailing list