]> Cypherpunks repositories - gostls13.git/commit
math/rand: avoid use of math.Pow in tests.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 3 Jul 2012 22:38:01 +0000 (00:38 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 3 Jul 2012 22:38:01 +0000 (00:38 +0200)
commit1a0a09dafecddf2b63befda53aa5e54d74ce19e1
tree85b14925fc13ff01472dd15fadab0c38b628bca5
parent55cc1ff721aaf14b27df31efcf0295c4ff09e35a
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
src/pkg/math/rand/rand_test.go