diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-11-20 17:49:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-11-20 17:49:01 +0000 |
commit | 1bfcf7518da45ac3a68d846c823c56b36c9cfe4d (patch) | |
tree | 5baa2667a5d652709e9dce57fa0d5ef30f99c1e9 /usr.bin/m4/extern.h | |
parent | 1b4625eed721e8d12995f70c88587cf78fad5a1e (diff) |
Optimization: cache the hashed value to avoid negative comparisons.
With 2^32 possible hash values, this means that collisions no longer
incur supplementary string compares, which was most of the reason for
STREQ in the first place...
Diffstat (limited to 'usr.bin/m4/extern.h')
-rw-r--r-- | usr.bin/m4/extern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h index aac317b5b51..1e7a2224fe8 100644 --- a/usr.bin/m4/extern.h +++ b/usr.bin/m4/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.11 1999/11/17 15:34:13 espie Exp $ */ +/* $OpenBSD: extern.h,v 1.12 1999/11/20 17:48:59 espie Exp $ */ /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */ /*- @@ -53,7 +53,7 @@ extern FILE *fopen_trypath __P((const char *filename)); /* look.c */ extern ndptr addent __P((const char *)); -extern int hash __P((const char *)); +extern unsigned hash __P((const char *)); extern ndptr lookup __P((const char *)); extern void remhash __P((const char *, int)); |