ahey at iee.org
Sat May 15 12:19:29 EDT 2004
On Friday 14 May 2004 5:05 pm, Simon Marlow wrote:
> On 14 May 2004 16:47, Christian Maeder wrote:
> > My experiments (with large maps) wrt. performance (and memory
> > consumption with and without optimization) of both Map and FiniteMap
> > implementations revealed differences, but no crucial ones.
> > "FiniteMap Int a" performs better than "Map Int a", but not as good as
> > "IntMap a", but the differences are unimportant for us.
> How much better? I'm not keen to import something that's going to
> degrade performance of existing code noticeably.
> If DData.Map performs worse than DData.FiniteMap, I'm sure it can be
> improved (they use the same algorithm, after all).
Would you be keen to use something that enhanced performance of existing
I've just been trying some simple benchmarks of my AVL implementation vs.
current FiniteMap implementation and using AVL trees seems to about twice
as fast for insertion. On my machine building an AVL tree of 1000000
(key,value) pairs takes about 5 seconds, whereas the same takes about 10
seconds with FiniteMap (the keys are Ints for this test).
Just thought I'd mention it as another data point for consideration if
changes are occuring (and bragging a little too I confess :-)
More information about the Libraries