From: Jim Meyering Date: Fri, 4 Jun 2010 13:30:47 +0000 (+0200) Subject: du: increase the initial dev-inode set size X-Git-Tag: v8.6~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d48bb0e9b771d95ee2cc2f57e73e1750e465cc;p=thirdparty%2Fcoreutils.git du: increase the initial dev-inode set size * src/du.c (INITIAL_DI_SET_SIZE): Increase to the prime just under 1024. This gives a speed-up of about 2% when processing a tree containing 100,000 files, each with a link count greater than 1, all pointing to files in some other tree. --- diff --git a/src/du.c b/src/du.c index 9a25858866..7c02c8619d 100644 --- a/src/du.c +++ b/src/du.c @@ -61,7 +61,7 @@ extern bool fts_debug; #endif /* Initial size of the hash table. */ -enum { INITIAL_DI_SET_SIZE = 103 }; +enum { INITIAL_DI_SET_SIZE = 1021 }; /* A set of dev/ino pairs. */ static struct di_set_state di_set;