summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
index 0aaf405213..8611f58571 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
@@ -56,10 +56,10 @@
If four pairs of (a,b,c) inputs are run through mix(), or through mix() in
reverse, there are at least 32 bits of the output that are sometimes the same
for one pair and different for another pair. This was tested for:
-
+
* pairs that differed by one bit, by two bits, in any combination of top bits
of (a,b,c), or in any combination of bottom bits of (a,b,c).
-
+
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the
output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly
produced by subtraction) look like a single 1-bit difference.
@@ -69,11 +69,11 @@
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that satisfy this
are:
-
+
4 6 8 16 19 4
9 15 3 18 27 15
14 9 3 7 17 3
-
+
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing for "differ" defined
as + with a one-bit base and a two-bit delta. I used
http://burtleburtle.net/bob/hash/avalanche.html to choose the operations,
@@ -106,10 +106,10 @@
Pairs of (a,b,c) values differing in only a few bits will usually produce
values of c that look totally different. This was tested for
-
+
* pairs that differed by one bit, by two bits, in any combination of top bits
of (a,b,c), or in any combination of bottom bits of (a,b,c).
-
+
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed the
output delta to a Gray code (a^(a>>1)) so a string of 1's (as is commonly
produced by subtraction) look like a single 1-bit difference. * the base