Skip to content

lemire/fastrandom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastrandom

(This code is for research purposes.)

Fast random number generation in Go. We use a division-less range function to get a "fast" shuffle in Go.

$ go get github.com/dgryski/go-pcgr
$ go version
go version go1.7beta2 linux/amd64
$ go test -bench=.
testing: warning: no tests to run
BenchmarkStandardShuffleWithGo1000-2                                50000         30628 ns/op
BenchmarkStandardShuffleWithPCGWithDivision1000_dgryski-2          200000          9016 ns/op
BenchmarkStandardShuffleWithPCGButNoDivision1000_dgryski-2         300000          5066 ns/op
PASS
ok      _/home/dlemire/CVS/github/fastrandom    5.293s

Further reading: http://lemire.me/blog/2016/06/30/fast-random-shuffling/

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages