chiark / gitweb /
chain.c, etc.: Add POSIX hsearch(3) and tsearch(3) support.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Mar 2025 21:44:20 +0000 (22:44 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 30 Mar 2025 21:48:44 +0000 (22:48 +0100)
commitfded5b8a27167974346bf12bec33994308bfa81e
tree30bcd451d5283c6b139e52df1019d8125eae6b57
parent2aa41d4fca7e23a89c6ba2a4e59d41fcc1d738f7
chain.c, etc.: Add POSIX hsearch(3) and tsearch(3) support.

GNU libc's hsearch(3) is surprisingly fast on its own, but it's sadly
fixed size, and there's no fast way to resize it.  So there are two
implementations, one of which will grow the table on demand, and the
other just allocates it big enough to begin with.

(Actually, they're the same, but the `fixed size' version just makes a
huge initial allocation.)
.gitignore
Makefile
chain.c
format-data
graphs.tex
summarize