aboutsummaryrefslogtreecommitdiff
path: root/src/core_write.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2017-06-11 23:39:04 +0000
committerGregory Maxwell <greg@xiph.org>2017-06-12 22:44:55 +0000
commitdd869c60ca069fa3eea3dd1aab977b8a10e05f2f (patch)
tree1c87af2fb7b99a1a0177d2fdbd583ebed5c0a257 /src/core_write.cpp
parent2c2d98806253db8c83055800a6bb14814a2f12b1 (diff)
Add an explanation of quickly hashing onto a non-power of two range.
In Olaoluwa Osuntokun's recent protocol proposal they were using a mod in an inner loop. I wanted to suggest a normative protocol change to use the trick we use here, but to find an explanation of it I had to dig up the PR on github. After I posted about it several other developers commented that it was very interesting and they were unaware of it. I think ideally the code should be self documenting and help educate other contributors about non-obvious techniques that we use. So I've written a description of the technique with citations for future reference.
Diffstat (limited to 'src/core_write.cpp')
0 files changed, 0 insertions, 0 deletions