Descriptionmath/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 issue 7267.
Patch Set 1 #Patch Set 2 : diff -r 7257b771f12b https://code.google.com/p/go/ #Patch Set 3 : diff -r 2750cd9fc49b https://code.google.com/p/go/ #
MessagesTotal messages: 8
|