]> Cypherpunks repositories - gostls13.git/commit
math: use Abs in Pow rather than if x < 0 { x = -x }
authorPlekhanov Maxim <kishtatix@gmail.com>
Fri, 22 Dec 2017 23:25:35 +0000 (02:25 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 4 Oct 2018 17:33:04 +0000 (17:33 +0000)
commit47e71f3b6917113660a65a180e66c91fc6318458
tree17108b538bb50ea0fd4bf69596598bd69b1b3d45
parent497d24178fdc321a037150656d51bec40f93e6d6
math: use Abs in Pow rather than if x < 0 { x = -x }

name     old time/op  new time/op  delta
PowInt   55.7ns ± 1%  53.4ns ± 2%  -4.15%  (p=0.000 n=9+9)
PowFrac   133ns ± 1%   133ns ± 2%    ~     (p=0.587 n=8+9)

Change-Id: Ica0f4c2cbd554f2195c6d1762ed26742ff8e3924
Reviewed-on: https://go-review.googlesource.com/c/85375
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/math/pow.go