/[Apache-SVN]
ViewVC logotype

Revision 1495204


Jump to revision: Previous Next
Author: stefan2
Date: Thu Jun 20 21:40:50 2013 UTC (10 years, 10 months ago)
Changed paths: 1
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


Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/tree.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26