[Haskell-cafe] Constructing Data.Map from ByteString
Adam Langley
agl at imperialviolet.org
Tue Mar 11 12:11:03 EDT 2008
On Mon, Mar 10, 2008 at 4:33 PM, Dave Tapley <dave.a.tapley at gmail.com> wrote:
> Concerning this minimal example:
> http://hpaste.org/6268
Change the Data.ByteString.Char8 to Data.ByteString.Lazy.Char8, also
the takeWhile, dropWhile pair is better expressed using span.
With those two changes, and a 150MB test file, a compiled binary is
using about 220MB of resident space. That seems pretty reasonable to
me.
As a purely subjective atheistic point: importing some modules
qualified will help your sanity. Otherwise you have lots of common
function names (readFile etc) and you have to try and figure out which
module they are going to resolve into all the time!
Cheers,
AGL
--
Adam Langley agl at imperialviolet.org http://www.imperialviolet.org
More information about the Haskell-Cafe
mailing list