Gregory Collins
Gregory Collins
@nominolo I think the underlying vector code should be responsible for throwing an exception or otherwise indicating OOM in this case.
In general the reason there's no size function for the typeclass is that it's O(n) for all but one of them. That said, I should probably add a size function...
Because hashtables are about speed, and if you don't need to do this bookkeeping (and clearly it's not necessary at least in the case of cuckoo hash), the program can...
It's not a good sign -- this means that the hashcodes array and keys/values arrays have gotten out of sync, and we've dereferenced a key containing `undefined` that we expected...
No but as I understand it's similar to cuckoo? I'm happy to take a patch
My thought is, I don't really know how to do it cleanly so I haven't implemented it yet, and the use case hasn't seemed compelling enough to make the work...
> The use case is to build the hash table kust once in ST and then use it in pure code just for lookups without having to wrap the pure...
P.S. `runST` wants a `forall s . ST s a`, which you won't be able to give it -- your hashtable will have a concrete state type `s`. So here...
Unboxed versions would be fine! They would surely perform better than the current ones, which are hampered by single-threadedness in the garbage collector.
Right now `insert` always inserts, i.e. it is really `replace`. That won't change without a major API overhaul.