Commit 47e71f3
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 <[email protected]>1 parent 497d241 commit 47e71f3
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 86 | + | |
93 | 87 | | |
94 | 88 | | |
95 | 89 | | |
| |||
147 | 141 | | |
148 | 142 | | |
149 | 143 | | |
150 | | - | |
| 144 | + | |
151 | 145 | | |
152 | | - | |
| 146 | + | |
153 | 147 | | |
154 | 148 | | |
155 | 149 | | |
| |||
0 commit comments