4 ms·
It's probably worth augmenting the tutorial to mention that you're using the Hashmap (Data.HashMap.Strict) in the Unordered-Containers package, rather than any
by carterschonwald 15y ago
It's probably worth augmenting the tutorial to mention that you're using the Hashmap (Data.HashMap.Strict) in the Unordered-Containers package, rather than any other ones, as its the most performant of the versions available and thus the one folks should use (amongst the hashmap implementations)
- shintoist 15y agoAbsolutely, I did experiment with http://hackage.haskell.org/package/hashtables http://hackage.haskell.org/package/hashtables, but did not notice enough of a difference in performance to decide it was worth using in this case, especially with the extra visual overhead of the state monad. I had expected it to be much faster, but I would probably chalk that up to me making mistakes in how to use it (iirc I wrote my own insertWith).
- carterschonwald 15y agoI think the hashetable package has a bit of a different performance / use case profile than the functional hash map data structure. Also I believe you need to spend more effort tuning which type of hashtable and your choice of hash function based upon your use case/ blend of operations. Some of the hashtable options regress to linear time insertions and lookups under certain use cases and load factors