diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-15 15:28:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-15 15:28:55 +0000 |
commit | 7285dcc5cc02f2e79f96fd4647cb1f1ac094b26b (patch) | |
tree | 134a03c979a8deecef80e2267f04566b04acdc6c /test-rewb-bsd.c | |
parent | 5f8f5dd2e0219fb9c5733ffe933ead27619e6d99 (diff) | |
download | mandoc-7285dcc5cc02f2e79f96fd4647cb1f1ac094b26b.tar.gz |
When looking up macro values while the macro tables are being built
in makewhatis(8), use ohash rather than linear searches.
This was identified as the main makewhatis(8) performance bottleneck
by Baptiste Daroussin <bapt at FreeBSD>, who also suggested part
of the improved algorithm.
This reduces the run time of "makewhatis /usr/share/man" from eleven
to five seconds on my notebook. Note that the changed code is not
used in apropos(1), so don't expect speedups there.
While here, sort macro values asciibetically, to improve reproducibility -
which still isn't perfect, but getting better.
Diffstat (limited to 'test-rewb-bsd.c')
0 files changed, 0 insertions, 0 deletions