math/rand: speed up Float32, Float64
Actually, speed up Int31n and Int63n by avoiding retry loop. benchmark old ns/op new ns/op delta BenchmarkFloat32 32 26 -19.45% BenchmarkFloat64 46 23 -49.47% Fixes #7267. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/69980047
Showing
Please
register
or
sign in
to comment