From: Martin Mares Date: Sat, 10 Feb 2007 20:21:43 +0000 (+0100) Subject: Added a magical constant estimating non-uniformity of hash functions. X-Git-Tag: holmes-import~506^2~13^2~145 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8f5b597a0c9187c0d7bc7785be0886023203dbfd;p=libucw.git Added a magical constant estimating non-uniformity of hash functions. --- diff --git a/lib/sorter/govern.c b/lib/sorter/govern.c index 8380f926..ddf919e2 100644 --- a/lib/sorter/govern.c +++ b/lib/sorter/govern.c @@ -177,7 +177,7 @@ sorter_radix_bits(struct sort_context *ctx, struct sort_bucket *b) return 0; u64 in = sbuck_size(b); - u64 mem = ctx->internal_estimate(ctx, b); + u64 mem = ctx->internal_estimate(ctx, b) * 0.8; // FIXME: Magical factor for hash non-uniformity if (in <= mem) return 0;