
14 May
2004
14 May
'04
1:16 p.m.
Simon Marlow wrote:
"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.
Ok, I'll send you numbers (later). Are you going to reimplement FiniteMap via DData.Map (or how could existing code suffer)?
(We would need a pure HashMap with O(1) lookup while extending the Map)
Could you elaborate?
Actually an IntMap or Array where we never try to lookup an index that has not been set before and once it's set, we'll never change the corresponding entry while avoiding the monad of mutable arrays or the HashTable implementation. Christian