test: Added a better PRNG (pseudorandom number generator)
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>
Sat, 24 Nov 2012 17:43:41 +0000 (19:43 +0200)
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>
Thu, 6 Dec 2012 15:20:27 +0000 (17:20 +0200)
commitd6545a2fc6f65c4959c6f85a15e95675347c0940
tree90962d44e9ece4231fc65e6623beb6e986ee6b1a
parent41f98a07fc3235b64713a39238238801304ac346
test: Added a better PRNG (pseudorandom number generator)

This adds a fast SIMD-optimized variant of a small noncryptographic
PRNG originally developed by Bob Jenkins:
    http://www.burtleburtle.net/bob/rand/smallprng.html

The generated pseudorandom data is good enough to pass "Big Crush"
tests from TestU01 (http://en.wikipedia.org/wiki/TestU01).

SIMD code uses http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html
which is a GCC specific extension. There is also a slower alternative
code path, which should work with any C compiler.

The performance of filling buffer with random data:
   Intel Core i7  @2.8GHz (SSE2)     : ~5.9 GB/s
   ARM Cortex-A15 @1.7GHz (NEON)     : ~2.2 GB/s
   IBM Cell PPU   @3.2GHz (Altivec)  : ~1.7 GB/s
test/Makefile.sources
test/prng-test.c [new file with mode: 0644]
test/utils-prng.c [new file with mode: 0644]
test/utils-prng.h [new file with mode: 0644]