X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=hash.cpp;fp=hash.cpp;h=cc15148cdd0d1f40a33add1d8ad398d18f7d7966;hb=dd46a39c59caf1ed3c3c79073a4acbd73c1496d0;hp=af56263ec5f71c71c161fd956572201eab6791e6;hpb=cb27055548a580a20c65a58cc1e1760a41245314;p=remoteglot-book diff --git a/hash.cpp b/hash.cpp index af56263..cc15148 100644 --- a/hash.cpp +++ b/hash.cpp @@ -6,9 +6,6 @@ using namespace std; int hash_key_to_bucket(const char* s, size_t len, int num_buckets) { - // We hash only the first 10 bytes; it should be enough to get a - // reasonable spread, but also mostly miss the move, so that - // same position + different move usually land in the same bucket. - len = min(len, 10); + len = min(len, HASH_PREFIX_BYTES); return util::Fingerprint32(s, len) % num_buckets; }