cvs commit: src/usr.bin/du du.c
kientzle at FreeBSD.org
Fri Apr 30 11:17:52 PDT 2004
kientzle 2004/04/30 11:17:51 PDT
FreeBSD src repository
Speed up hardlink detection by using a self-sizing hash
table rather than the old linear list search.
On my "hardlink detection torture test", this reduced
user time from 4700 seconds down to 4.2 seconds
and wallclock time from 1:24:48 down to 1:08.
(Yes, that's over one THOUSAND times reduction in user time. ;-)
In the worst case, the new code doubles peak memory usage,
though it could actually reduce memory usage in many cases.
MFC after: 1 week
PR: misc/42167, bin/51151
Revision Changes Path
1.30 +141 -32 src/usr.bin/du/du.c
More information about the cvs-src