On Sep 5, 2006, at 7:05 AM, Chris Kuklewicz wrote:
Bulat Ziganshin wrote:
Hello Bertram,
Tuesday, September 5, 2006, 12:24:57 PM, you wrote:
A quick hack up to use Data.ByteString uses a lot less ram, though
profiling still shows 95% of time spent in the building the Map.
Data.HashTable may
Donald Bruce Stewart wrote:
A quick hack up to use Data.ByteString uses a lot less ram, though
profiling still shows 95% of time spent in the building the Map.
Nice!
k n w = Map.insertWith f w 1 n
f _ x = let y = x + 1 in y `seq` y
y `seq` y is semantically equivalent to
Hello Bertram,
Tuesday, September 5, 2006, 12:24:57 PM, you wrote:
A quick hack up to use Data.ByteString uses a lot less ram, though
profiling still shows 95% of time spent in the building the Map.
Data.HashTable may be a faster alternative for Map (if ordering isn't
required)
--
Best
John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of about
90MB. It eats RAM like crazy, and I can't figure out why.
wordfreq inp = Map.toList $ foldl' updatemap (Map.empty::Map.Map String Int)
inp
where updatemap nm word = Map.insertWith updatefunc
Bulat Ziganshin wrote:
Hello Bertram,
Tuesday, September 5, 2006, 12:24:57 PM, you wrote:
A quick hack up to use Data.ByteString uses a lot less ram, though
profiling still shows 95% of time spent in the building the Map.
Data.HashTable may be a faster alternative for Map (if ordering isn't
Bulat Ziganshin wrote:
Data.HashTable may be a faster alternative for Map (if ordering isn't
required)
Or it may not. Finding a good hash function for the words John is
counting, is a challenge itself. Finding a good one that doesn't look
at each character at least once, might be outright
On Tue, Sep 05, 2006 at 12:55:48PM +0200, Udo Stenzel wrote:
IMHO all accumulating functions, especially foldl, State.update,
Map.insertWith, accumArray, absolutely need a strict version, because
the strictness cannot be recovered by the library's user.
We already have foldl'. Here's a strict
I have the below program, and I'm trying to run it on an input of about
90MB. It eats RAM like crazy, and I can't figure out why.
I do know that the problem is not my custwords function (as you can see,
I replaced the call to it with a call to the standard words function on
the last line). It
The x+1 looks suspicious.
On Sep 4, 2006, at 23:03 , John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of
about
90MB. It eats RAM like crazy, and I can't figure out why.
I do know that the problem is not my custwords function (as you can
see,
I replaced
At Tue, 5 Sep 2006 03:03:51 + (UTC),
John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of about
90MB. It eats RAM like crazy, and I can't figure out why.
I have not looked in detail at your code -- but it could simply be the
fact that String requires gobs
jeremy.shaw:
At Tue, 5 Sep 2006 03:03:51 + (UTC),
John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of about
90MB. It eats RAM like crazy, and I can't figure out why.
I have not looked in detail at your code -- but it could simply be the
fact that
At Mon, 04 Sep 2006 22:05:57 -0700,
Jeremy Shaw wrote:
At Tue, 5 Sep 2006 03:03:51 + (UTC),
John Goerzen wrote:
I have the below program, and I'm trying to run it on an input of about
90MB. It eats RAM like crazy, and I can't figure out why.
If you fold a Data.Map or associative
12 matches
Mail list logo