Author: blair Revision: 1495204 Modified property: svn:log Modified: svn:log at Fri Jun 21 00:43:00 2013 ------------------------------------------------------------------------------ --- svn:log (original) +++ svn:log Fri Jun 21 00:43:00 2013 @@ -1,5 +1,15 @@ Follow-up to r1495063: integer overflows result in an inefficient hash function and reduce cache effectiveness. +This illustrates what happened before the patch: + + char c = 99; + unsigned hash = 0; + hash |= c << 8; /* c << 8 is often 0, actually it's undefined */ + +On a more general note, you don't want to make it easy for parts of +the input to cancel each other out. So, adding (potentially) negative +values is a bad thing (strategically). + * subversion/libsvn_fs_fs/tree.c (cache_lookup): prevent unnecessary integer overflows in hash function
