]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
du: increase the initial dev-inode set size
authorJim Meyering <meyering@redhat.com>
Fri, 4 Jun 2010 13:30:47 +0000 (15:30 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 4 Jul 2010 09:15:48 +0000 (11:15 +0200)
* 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.

src/du.c

index 9a2585886621a5af9f07ce9068a4fbc1bc8886ec..7c02c8619d3af7e2ad8fca70aadc69abe661b1bc 100644 (file)
--- 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;