Module Name:    src
Committed By:   rillig
Date:           Sun Jul  7 09:37:00 UTC 2024

Modified Files:
        src/usr.bin/make: hash.c hash.h
        src/usr.bin/make/unit-tests: Makefile opt-debug-hash.exp

Log Message:
make: don't track hash table chain lengths during lookup

The chain lengths are only used for debugging purposes, so avoid the
extra cost at each lookup.  Instead, calculate the maximum chain length
only when it is actually requested in -dh mode.

The reported number changes slightly: Before, it was the length of the
chain that was actually traversed to find an entry, up to that entry,
now it is the length of the largest chain in the table, no matter if it
was actually accessed or not.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/make/hash.c
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/make/hash.h
cvs rdiff -u -r1.349 -r1.350 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/opt-debug-hash.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to