[Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

Sebastian Sylvan sebastian.sylvan at gmail.com
Thu Nov 10 11:16:03 EST 2005


On 11/9/05, Ketil Malde <ketil at ii.uib.no> wrote:
> Sebastian Sylvan wrote:
>
> >On 11/8/05, Jan-Willem Maessen <jmaessen at alum.mit.edu> wrote:
> >
> >
> >>Just wanted to let people know that I've been working on improving
> >>Data.HashTable, with the help of Ketil Malde's badly performing code
> >>
> >>
> >>
> Always happy to help, of course - bad performance R us:-)
>
> >Request: Data.HashTable.Immutable
> >
> >
> I'm not sure you really want that - do you wish to copy a large array
> each time you do an update?

Well if you want a mutable hashtable you use the mutable one. In  many
cases you want to have a map from generic keys to values that never
(or very seldom) change. A Data.Map is usually used in this case, but
if you do a lot of lookups it would be nice to have a hashmap that can
still be used in pure code.
It's basically analogue to Arrays. Sometimes you use IArray and
sometimes MArray. In fact the hashmap could be parameterized on an
internal Array representation so you could have DiffArray based
Hashmaps which support O(1) updates, but still has an immutable
interface.

/S

--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list