daanleijen at xs4all.nl
Tue May 25 17:09:34 EDT 2004
On Tue, 25 May 2004 12:02:22 +0100, Adrian Hey <ahey at iee.org> wrote:
> On Tuesday 25 May 2004 10:25 am, Simon Marlow wrote:
>> Yes, IntMap should get faster lookup. I looked at the code and managed
>> to make a couple of improvements: adding a 'seq k $' at the beginning of
>> lookup helps, and I fixed a small performance problem with the Word
>> library, but interestingly these don't help the results. I still get
>> 0.16s for the lookup test, so perhaps it is dominated by something else.
> I think yesterdays changes announced by JP Bernardy probably improve
> matters a lot if there's any truth in my No. of heap records theory.
> Before this change it would have had the same 2 records/tree node
> overhead as FiniteMap/DData.Map.
I can see another speed improvement to lookup too: it now repeatedly
does "fromIntegral" on the keys (via "zero" and "nomatch") maybe
by let-binding and inlining this, we can make it faster. (I have
not done any of this up till now, as it is not resistant to change
but I guess that doesn't matter that much any more.)
I'll tweak JP's latest sources and post them here again, so that
Simon can run his benchmark on it.
All the best,
More information about the Libraries