Skip to content

RDRAND Instruction for Golang (created for simpleness and purity)

License

Notifications You must be signed in to change notification settings

SeanTolstoyevski/crndm

Repository files navigation

CRNDM - Generate Random Numbers with Hardware

Go Reference

Benchmark Results:

Note

Rdrand and Rdseed instructions are not designed for speed. Moreover, the process is even slower because Golang cannot inline assembly codes.


...>go test -bench=.
goos: windows
goarch: amd64
pkg: github.com/SeanTolstoyevski/crndm
cpu: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
BenchmarkCrmdnAsUint64-12       10217383               115.6 ns/op
BenchmarkCrmdnAsUint32-12       10326488               116.5 ns/op
BenchmarkCrmdnAsUint16-12       10796784               114.0 ns/op
PASS
ok      github.com/SeanTolstoyevski/crndm       4.756s

Sources

Rdrand - Wikipedia

A Quick Guide to Go's Assembler - The Go Programming Language

Releases

No releases published

Packages

No packages published