]> Sergey Matveev's repositories - nnn.git/commit
icons-hash: misc improvements (#1553)
authorN-R-K <nrk@disroot.org>
Mon, 2 Jan 2023 16:53:18 +0000 (16:53 +0000)
committerGitHub <noreply@github.com>
Mon, 2 Jan 2023 16:53:18 +0000 (22:23 +0530)
commit2000ed5080d7bd7931a472b9f7081138f2cfbadf
tree7bc5ecb8ea056f86986f5750b7dd418ac25e3767
parenta51437ff1626fb70a70625642e5afec7e3a491f0
icons-hash: misc improvements (#1553)

* icons-hash: take total probe count into account as well

* icons-hash: use a better PRNG

the older method was using a multiplicative congruential generator (MCG)
which doesn't work too well especially with just 32 bits of state.

change it to a PCG instead with 64 bits of state (and 32 bits of output)
which should give better results.

and since we should get better rng - the search iteration has been
halved as well to save some build time.

* icons-hash: use an xor-rotate hash function

* icons-hash: fix some compiler warnings
src/icons-hash.c