[Haskell-cafe] Slower with ByteStrings?

Bryan O'Sullivan bos at serpentine.com
Sat May 26 19:30:50 EDT 2007


Jason Dagit wrote:

> I think, given my simple algorithm that means that (==) for
> ByteStrings is slower than (==) for String.  Is this possible?

Yes indeed.  Over ByteStrings, (==) is implemented as a call to memcmp. 
  For small strings, this loses by a large margin because it has to go 
through the FFI.

	<b


More information about the Haskell-Cafe mailing list