Log Message: |
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
|