Permalink
Browse files

CLJ-1344 - update mapHasheq function to call Murmur3. This is used by…

… defrecord and some external collections

Signed-off-by: Stuart Halloway <stu@cognitect.com>
  • Loading branch information...
1 parent 6aaaa0a commit 22b0c0acf6227ab74a37d32644b44b574ca8de11 @puredanger puredanger committed with stuarthalloway Feb 7, 2014
Showing with 9 additions and 8 deletions.
  1. +9 −8 src/jvm/clojure/lang/APersistentMap.java
@@ -121,14 +121,15 @@ public int hasheq(){
}
static public int mapHasheq(IPersistentMap m) {
- int hash = 0;
- for(ISeq s = m.seq(); s != null; s = s.next())
- {
- Map.Entry e = (Map.Entry) s.first();
- hash += Util.hasheq(e.getKey()) ^
- Util.hasheq(e.getValue());
- }
- return hash;
+ return Murmur3.hashUnordered(m);
+// int hash = 0;
+// for(ISeq s = m.seq(); s != null; s = s.next())
+// {
+// Map.Entry e = (Map.Entry) s.first();
+// hash += Util.hasheq(e.getKey()) ^
+// Util.hasheq(e.getValue());
+// }
+// return hash;
}
static public class KeySeq extends ASeq{

0 comments on commit 22b0c0a

Please sign in to comment.