diff options
author | Bruno Haible <bruno@clisp.org> | 2009-01-19 09:50:07 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-01-19 09:50:07 +0000 |
commit | 57745086ac72e67c33a8535b4916963b10777842 (patch) | |
tree | cf51eb86e28ff19fd72919425a552ac10cfdee3b /ChangeLog | |
parent | 7fac4aa2b6eecf2cc47acffb2d9beebb8c2c2066 (diff) | |
download | gperf-57745086ac72e67c33a8535b4916963b10777842.tar.gz |
Don't include the length in the hash function if all keywords have the same
length.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,23 @@ +2009-01-19 Bruno Haible <bruno@clisp.org> + + Don't include the length in the hash function if all keywords have the + same length. + * src/search.h (Search): Add _hash_includes_len field. + * src/search.cc (Search::prepare): Initialize it. + (Search::count_duplicates_tuple, Search::count_duplicates_multiset, + Search::prepare_asso_values, Search::find_asso_values, + Search::compute_hash): Use it instead of !option[NOLENGTH]. + * src/output.h (Output): New field _hash_includes_len. Add it as + constructor argument. + * src/output.cc (Output::Output): Add hash_includes_len argument. + (Output::output_hash_function): Use _hash_includes_len instead of + !option[NOLENGTH]. + * src/main.cc (main): Pass _hash_includes_len from Search to Output. + * tests/permut2.exp: Updated expected test result. + * tests/permut3.exp: Likewise. + * tests/permutc2.exp: Likewise. + Reported by Behdad Esfahbod <behdad@behdad.org>. + 2009-01-14 Bruno Haible <bruno@clisp.org> * configure.ac: More consistent m4 quoting. |