Commit 47e71f3b authored by Plekhanov Maxim's avatar Plekhanov Maxim Committed by Brad Fitzpatrick
Browse files

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 497d2417
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment