Skip to content
Snippets Groups Projects
Commit 1a0a09da authored by Rémy Oudompheng's avatar Rémy Oudompheng
Browse files

math/rand: avoid use of math.Pow in tests.

The use of math.Pow for mere squaring can be extremely
slow on soft-float ARM. Even on systems with hardware
floating-point, a speedup in test duration is observed.

On amd64
Before: ok      math/rand       2.009s
After:  ok      math/rand       0.340s

Fixes #3740.

R=dave, golang-dev, r, r
CC=golang-dev
https://golang.org/cl/6348061
parent 55cc1ff7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment