Skip to content

Instantly share code, notes, and snippets.

@alphazero
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphazero/1684fa102bb545ecb3f7 to your computer and use it in GitHub Desktop.
Save alphazero/1684fa102bb545ecb3f7 to your computer and use it in GitHub Desktop.
go test -bench results of distributing random % slotcnt + times
XorShift*
453361 of 524288 slots with ideal cnt of 2
ideal: 141655 (27.019%)
missed: 70927 (13.528%)
less: 142038 (27.092%)
more: 169668 (32.362%)
max hits: 12
STD-LIB
452947 of 524288 slots with ideal cnt of 2
ideal: 141284 (26.948%)
missed: 71341 (13.607%)
less: 141686 (27.024%)
more: 169977 (32.421%)
max hits: 11
STD-LIB - thread-safe
452947 of 524288 slots with ideal cnt of 2
ideal: 141284 (26.948%)
missed: 71341 (13.607%)
less: 141686 (27.024%)
more: 169977 (32.421%)
max hits: 11
PASS
BenchmarkUint64 300000000 6.04 ns/op
BenchmarkStdlibUint64Threaded 50000000 33.8 ns/op
BenchmarkStdlibUint64 100000000 12.1 ns/op
ok kaveh/lib/prng 6.424s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment