Add an LFSR PRNG for bench
authorAlex Pyrgiotis <apyrgio@grnet.gr>
Mon, 18 Feb 2013 19:56:20 +0000 (21:56 +0200)
committerFilippos Giannakos <philipgian@grnet.gr>
Mon, 11 Mar 2013 09:52:28 +0000 (11:52 +0200)
commitee638823721890c983daabf7800271092cb1705b
tree8cd33ca3565edceedf8a1bc0ea1feda8ef5a08c2
parentb003d80d626b995ee772473d640ca40b76c24929
Add an LFSR PRNG for bench

The PRNG introduced by this commit is a Galois-XNOR LFSR, which can
generate unique pseudorandom numbers. Also, seeded with the same
seed, it will produce the same sequence.

This implementation is driven by the needs of XSEG for a blazing fast
random generator. Initial tests show that it's capable of producing 2^38
unique pseudorandom numbers in less than 10 minutes (which equals to 2
nanoseconds per number).
xseg/peers/user/Makefile
xseg/peers/user/bench-lfsr.c [new file with mode: 0644]
xseg/peers/user/bench-xseg.c
xseg/peers/user/bench-xseg.h