Re: [Haskell] more newbie questions regarding do syntax, mondic context & Data.HashTable

On 12/29/05, Hunter Kelly
Hi there, I'm having some trouble trying to get information out of a HashTable.
I'm using it to represent a set (I'm using a hash table for O(1) speed reasons to compare against Data.Sets O(lgN) operations).
I don't think anyone has ever asked for a "pure" version of the hashtable. (It could be frozen and thawed in the same fashion as Arrays are). Maybe someone has written something like that and is willing to share? On the other hand, it's entirely possible that you can get away with either Data.Map or saying within the IO monad. Cheers, JP.

Well, in this case, I want to see what the speed difference is between
the O(lgN) operations from Data.Set vs. the O(1) of the HashTable type.
(Assuming I'm able to get it working - grr!)
A "pure" O(1) hashtable/map/whatever would sure be handy!
H
On 12/29/05, Jean-Philippe Bernardy
On 12/29/05, Hunter Kelly
wrote: Hi there, I'm having some trouble trying to get information out of a HashTable.
I'm using it to represent a set (I'm using a hash table for O(1) speed reasons to compare against Data.Sets O(lgN) operations).
I don't think anyone has ever asked for a "pure" version of the hashtable. (It could be frozen and thawed in the same fashion as Arrays are). Maybe someone has written something like that and is willing to share?
On the other hand, it's entirely possible that you can get away with either Data.Map or saying within the IO monad.
Cheers, JP.
participants (2)
-
Hunter Kelly
-
Jean-Philippe Bernardy