gracjanpolak:
Gracjan Polak gracjanpolak at gmail.com writes:
Don Stewart dons at galois.com writes:
ByteStrings have all the same operations as lists though, so you can
index, compare and take substrings, with the benefit that he underlying
string will be shared, not copied.
Gracjan Polak [EMAIL PROTECTED] writes:
The problem is that my prog allocates a lot just to free it immediatelly
after.
But what?
Use +RTS -hd instead, which will tell you the constructor.
I bet you'll find it's (:), and that you are retaining a load of Chars
from your input file, pending
Gracjan Polak [EMAIL PROTECTED] writes:
I tried both Map and IntMap and there was no difference in memory total usage
or
usage pattern. Seems I'm already strict enough.
This only proves Map and IntMap are equally strict, or in other words,
they are both lazy in the elements.
Values are
gracjanpolak:
Ketil Malde ketil+haskell at ii.uib.no writes:
Then you get the memory behavior you ask for. Unevaluated strings are
extremely expensive, something like 12 bytes per char on 32 bit, twice
that on 64 bits, and then you need GC overhead, etc. ByteStrings are
much better,