On 10/17/07, Thomas Hartman [EMAIL PROTECTED] wrote:
Is there a more scientific way of figuring out if one version is better
than the other by using, say profiling tools?
Profiling Haskell programs is black magic, but of the sort you learn by
having a problem to solve. I don't think it
Thomas Hartman wrote:
Since I'm interested in the stack overflow issue, and getting acquainted
with quickcheck, I thought I would take this opportunity to compare your
ordTable with some code Yitzchak Gale posted earlier, against Ham's
original problem.
As far as I can tell, they're the
Hi Chad,
Chad Scherrer wrote:
I think the stack overflows
were happening because Map.insertWith isn't strict enough.
Otherwise I think the code is the same.
They are visibly almost identical - except that you
do an extra lookup to get your strictness, while insertWith'
has internal access and
PM
To
Thomas Hartman/ext/[EMAIL PROTECTED]
cc
haskell-cafe@haskell.org, [EMAIL PROTECTED]
Subject
Re: [Haskell-cafe] Re: Suspected stupid Haskell Question
Hmm, is insertWith' new? If I remember right, I think the stack overflows
were happening because Map.insertWith isn't strict enough
Thomas Hartman wrote:
Since I'm interested in the stack overflow issue, and getting acquainted
with quickcheck, I thought I would take this opportunity to compare your
ordTable with some code Yitzchak Gale posted earlier, against Ham's
original problem.
As far as I can tell, they're the
Big_Ham joymachine2001 at hotmail.com writes:
Is there a library function to take a list of Strings and return a list of
ints showing how many times each String occurs in the list.
So for example:
[egg, egg, cheese] would return [2,1]
I couldn't find anything on a search, or
Subject
[Haskell-cafe] Re: Suspected stupid Haskell Question
Big_Ham joymachine2001 at hotmail.com writes:
Is there a library function to take a list of Strings and return a list
of
ints showing how many times each String occurs in the list.
So for example:
[egg, egg, cheese] would
Hmm, is insertWith' new? If I remember right, I think the stack overflows
were happening because Map.insertWith isn't strict enough. Otherwise I think
the code is the same. But I would expect intTable to be faster, since it
uses IntMap, and there's no IntMap.insertWith' as of 6.6.1 (though it may