Absolutely, I did experiment with 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).