]> git.sesse.net Git - plocate/commit
Get rid of the hash table in plocate-build.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 3 Oct 2020 09:47:02 +0000 (11:47 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 3 Oct 2020 09:47:02 +0000 (11:47 +0200)
commit010647dd641e10619f7df1b24e040d74fff002a4
treea1b5107b7d9af908a8e431e270faa339023ae1bb
parentbc935621a37e325b22b7fbf954cc12c47278ff8b
Get rid of the hash table in plocate-build.

std::unordered_map isn't the most performant hash table around;
replace it with a simple array of pointers. (An array of objects
would take >1GB RAM.) This costs ~120 MB fixed RAM overhead
(roughly doubling the RAM usage again for moderate-size corpora),
but also roughly doubles the build speed.
plocate-build.cpp