summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff3.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-02-29 12:21:10 +0000
committerderaadt <deraadt@openbsd.org>2008-02-29 12:21:10 +0000
commit3084b445b4315f5741bfe69a7a6133df78974707 (patch)
treefebb4e36df03c003a255e979aeacf8a98d508377 /usr.bin/cvs/diff3.c
parentreplacement algorithm. initialize a 64K-short buffer using Durstenfeld (diff)
downloadwireguard-openbsd-3084b445b4315f5741bfe69a7a6133df78974707.tar.xz
wireguard-openbsd-3084b445b4315f5741bfe69a7a6133df78974707.zip
replacement algorithm. initialize a 64K-short buffer using Durstenfeld
shuffle. Upon allocation, swap-permute the new value to a random slot in the 0..32K-1 th entry of the buffer as we move forward, ensuring randomness but also satisfying the non-repeating property we need. Inspired by Dillon's implementation for ip id. We believe this is easier to read though, initializes with less bias and wins speed tests. Thanks a lot to mcbride and djm for doing a bunch of statistical and speed analysis, and comments from nordin ok jakob djm mcbride
Diffstat (limited to 'usr.bin/cvs/diff3.c')
0 files changed, 0 insertions, 0 deletions