Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-08-03 13:52:03 -0700 (Fri, 03 Aug 2007)
Revision: 11553
Log message:
Set svn:eol-style to native, where appropriate.
Changes | Path |
Properties | libmojave/cutil/inotify.om |
Properties | libmojave/stdlib/lm_heap.ml |
Properties | libmojave/stdlib/lm_heap.mli |
Properties | libmojave/util/lm_string_hash.ml |
Properties | libmojave/util/lm_string_hash.mli |
Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-08-03 13:59:18 -0700 (Fri, 03 Aug 2007)
Revision: 11554
Log message:
Set svn:eol-style to native, where appropriate.
Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-08-23 15:13:20 -0700 (Thu, 23 Aug 2007)
Revision: 12016
Log message:
Our hash was a little weak. Specifically, any sequence of text where
the characters code sum up to 6229 can be pumped without changing
the hash.
Changed this:
digest.(i) <- digest.(i) lxor (Array.unsafe_get hash_data (code + i))
To this:
digest.(i) <- (digest.(i) * 3) lxor (Array.unsafe_get hash_data (code + i))
This is from the s-box implementation at http://bretm.home.comcast.net/hash/10.html
I did some performance analysis, checking build times for omake. It is lost
in the noise at least on MacOS/Intel.
However, if performance is an issue we could to the shift and add (might be
faster than an multiply):
x <- ((x lsl 1) + x) lxor y
BTW, this topic isn't entirely random. I was working on a hash example
for the book.
Changes | Path(relative to libmojave/util) |
+2 -2 | lm_hash.ml |