Simon Peyton-Jones wrote:
A String is a [Char] and a Char is a heap object. So
a file represented as a string takes a massive 20 bytes/char
(12 for the cons cell, 8 for the Char cell). Then it's all sucked
through several functions.
It's entirely possible, though, that the biggest
If Posix.runProcess really is supposed "our candidate for the high-level OS-independent
primitive" (see documentation), it would help if there was a documented way of using it
with pipes. The problem is that runProcess takes handles as arguments, while the
obvious
function, createPipe, returns
Reducing the 46M reported on the shootout without changing the
program would be interesting. An easy way for improvement
would be to share characters and small integers like is done in Hugs.
This would mean the initial list of characters would be reduced from
40M to 24M, so the total should