diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:46:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-09-14 13:46:46 +0000 |
commit | cc11fcd76306cd4861949984c169afd9d9b1f759 (patch) | |
tree | f2811d279907b0c95af6a40754e79cad5e2dc6ce /usr.bin/make/dir.h | |
parent | c4465c8c2691ab013c83c9c05cb5c22c8131bcf7 (diff) |
Replace the old hash used to hold file names within a directory with
open hashing.
An interesting optimization is that the open hashing interface is more
fine-grained, hence we can compute the correct hash value at the start
of Dir_FindFile, and reuse it for each hash structure into which we look
(the effect is measurable on large directories along with objdir/VPATH).
Remove a few unnecessary Lst_Open/Lst_Close that serve no purpose except
obfuscating the code.
The interface to dir.h changes slightly, hence tedious includes changes...
Diffstat (limited to 'usr.bin/make/dir.h')
-rw-r--r-- | usr.bin/make/dir.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/dir.h b/usr.bin/make/dir.h index bc563fe76d7..29de013dbaf 100644 --- a/usr.bin/make/dir.h +++ b/usr.bin/make/dir.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.h,v 1.8 2000/09/14 13:43:31 espie Exp $ */ +/* $OpenBSD: dir.h,v 1.9 2000/09/14 13:46:45 espie Exp $ */ /* $NetBSD: dir.h,v 1.4 1996/11/06 17:59:05 christos Exp $ */ /* @@ -51,7 +51,7 @@ typedef struct Path_ { int refCount; /* Number of paths with this directory */ int hits; /* the number of times a file in this * directory has been found */ - Hash_Table files; /* Hash table of files in directory */ + struct hash files; /* Hash table of files in directory */ char name[1]; /* Name of directory */ } Path; |