From 3eab05ef9de9959c0e67f23d020ed1fa06b16d49 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 26 Sep 2014 05:45:25 +0200 Subject: dpkg: Double the filesdb hash table size to the closest 2^18 prime Times have changed, and it's common to have at least these many files. This reduces the amount of collisions. Eventually we should switch to dynamically growing hash tables. --- src/filesdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/filesdb.c b/src/filesdb.c index 9c8780e46..fc8dd55fc 100644 --- a/src/filesdb.c +++ b/src/filesdb.c @@ -525,8 +525,8 @@ struct fileiterator { }; /* This must always be a prime for optimal performance. - * This is the closest one to 2^17 (131072). */ -#define BINS 131071 + * This is the closest one to 2^18 (262144). */ +#define BINS 262139 static struct filenamenode *bins[BINS]; -- cgit v1.2.3