Clojure does not guarantee that equivalent maps have equivalent structure. The paper referenced elsewhere in the thread does have that invariant, and it does allow for faster negative equality checks. A more interesting consequence of that invariant, not explored in the paper, is that set operations can be significantly faster. An implementation, and benchmarks including Clojure’s and Steindorfer’s implementations, can be found at https://github.com/lacuna/bifurcan.
9 Likes