]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: hashmap - cripple the hash function by truncating the input rather than the...
authorTom Gundersen <teg@jklm.no>
Sat, 3 Oct 2015 23:14:41 +0000 (01:14 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 5 Oct 2015 16:19:18 +0000 (18:19 +0200)
commit57217c8f2a2dea07b41ecf05000172ce77a90466
treea84788a8c023bac7ab897b89f26301ec84c80637
parent1283d704172cb3852c717fe8cfaebe7a56d0aebf
test: hashmap - cripple the hash function by truncating the input rather than the output

The reason for the crippled hash function is to reduce the distribution
of the hash function, do this by truncating the domain rather than the
range. This does introduce a change in behavoir as the range is no longer
contiguous, which greatly reduces collisions.

This is needed as a follow-up patch will no longer allow individual hash
functions to alter the output directly.
src/test/test-hashmap-plain.c