[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Is Haskell capable of matching C in string processing

Subject: Re: [Haskell-cafe] Is Haskell capable of matching C in string processing performance?
From: Don Stewart
Date: Fri, 22 Jan 2010 10:08:17 -0800
jmillikin:
> There's no such thing as "cheating", though that particular code won't
> work for my purposes because it assumes the output is merely a stream
> of "null". Fine for the benchmark, but not extractable to the full
> problem.
> 
> I wonder: is Handle known to be particularly slow? This code only has
> to work on Linux and BSD, so if using (for example) a POSIX fd would
> be much faster, it could bring the Haskell version much closer to C.
> 

Just make sure you're using the same data types and IO methods as in C,
and you'll get the same performance. For serializing/writing to packed
data, Data.Binary or cereal are a good choice for building bytestrings
efficiently, which in turn can be output quickly via bytestring IO.

-- Don
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>