1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:21:22 -06:00
go/src/pkg/rand
Russ Cox f64bb56bae rand: add explicit Int31n to avoid 64-bit divide on 32-bit machines
use Int31n in Intn when possible.

Fixes #390.

(using 8g)
Intn1000      50000000         38 ns/op
Int31n1000    50000000         39 ns/op
Int63n1000    20000000        114 ns/op

R=r
CC=golang-dev, skybrian
https://golang.org/cl/180054
2009-12-15 17:21:34 -08:00
..
exp.go 1) Change default gofmt default settings for 2009-12-15 15:40:16 -08:00
Makefile go: makes it build for the case $GOROOT has whitespaces 2009-11-23 17:32:51 -08:00
normal.go 1) Change default gofmt default settings for 2009-12-15 15:40:16 -08:00
rand_test.go rand: add explicit Int31n to avoid 64-bit divide on 32-bit machines 2009-12-15 17:21:34 -08:00
rand.go rand: add explicit Int31n to avoid 64-bit divide on 32-bit machines 2009-12-15 17:21:34 -08:00
rng.go 1) Change default gofmt default settings for 2009-12-15 15:40:16 -08:00