+void MapRegionCounters::combineHash(ASTHash Val) {
+  // Use Bernstein's hash.
+  Hash = Hash * 33 + Val;
+}

So, you care a lot about collisions, but you use Bernstein's hash? I don't
get it. This will collide like crazy. Note that Bernstein's hashing
algorithm is only ever a "good" distribution for hashing ascii-ish text,
and you're hashing dense things.

If you care about collisions, I would use the high 64 bits of an md5 (or
better yet, all 128 bits). Or some other well researched and understood
algorithm.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to