* lib/exclude.c (string_hasher_ci): Take the modulo at the end
rather than each time a wide character is retrieved; this should
be more efficient and should hash better.
+2021-06-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ exclude: improve wide-character hashing
+ * lib/exclude.c (string_hasher_ci): Take the modulo at the end
+ rather than each time a wide character is retrieved; this should
+ be more efficient and should hash better.
+
2021-06-11 Bruno Haible <bruno@clisp.org>
Make message in last commit more precise.
else
wc = *m.ptr;
- value = (value * 31 + wc) % n_buckets;
+ value = value * 31 + wc;
}
- return value;
+ return value % n_buckets;
}
/* compare two strings for equality */