diff options
author | 2017-01-15 15:28:55 +0000 | |
---|---|---|
committer | 2017-01-15 15:28:55 +0000 | |
commit | ebd515705cd44f744240e095a723a476fb6a95ef (patch) | |
tree | a4211b2acaf54a3ba3e735a6b118eff9eb7c451e /msec.in | |
parent | 118689aa2e6ecb08ee82301bd70a70d41d1fea96 (diff) | |
download | mandoc-ebd515705cd44f744240e095a723a476fb6a95ef.tar.gz mandoc-ebd515705cd44f744240e095a723a476fb6a95ef.tar.zst mandoc-ebd515705cd44f744240e095a723a476fb6a95ef.zip |
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 'msec.in')
0 files changed, 0 insertions, 0 deletions