Tom HawtinThomas Hawtin's WeblogHash imperfection- March 1, 2006 How difficult can hash algorithms be Take some values and produce another value. Any value. Recently I have stumbled across two poorly performing hash algorithms. One was in javac. In com.sun.tools.javac.util.Name to be precise. Name.hashValue ignores all but the first, middle and last characters (actually bytes). As is usual with these things, the entire sequence will either be compared or copied at more-or-less the same time. The data will usually be cached anyway. In order to achieve a...http://www.jroller.com/tackline/entry/hash_imperfection |