Fast random generator (6ns) without state
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.travis.yml
LICENSE
README.md
fastrand.go
fastrand_amd64.s
fastrand_test.go

README.md

FastRand

FastRand generate pseudo random int between 0 and n. Argument n must be power of 2. Average working time of FastRand is 6ns.

Build Status Go Report Card

Example

package main

import (
  "fmt"
  "github.com/miolini/fastrand"
)

func main() {
  for i:=0; i<10; i++ {
    fmt.Println(fastrand.FastRand(64))
  }
}