Commit d2c5fa0
strconv: remove &0xFF trick in formatBase10
The compiler is now smart enough to remove the bounds check itself.
│ 731f809c971 │ 48fabc7d33b │
│ sec/op │ sec/op vs base │
AppendUint-12 98.69n ± 1% 95.81n ± 1% -2.91% (p=0.000 n=20)
AppendUintVarlen/digits=1-12 3.119n ± 1% 3.099n ± 1% ~ (p=0.743 n=20)
AppendUintVarlen/digits=2-12 2.654n ± 0% 2.653n ± 0% ~ (p=0.825 n=20)
AppendUintVarlen/digits=3-12 5.042n ± 0% 5.055n ± 1% ~ (p=0.005 n=20)
AppendUintVarlen/digits=4-12 5.062n ± 1% 5.044n ± 0% ~ (p=0.011 n=20)
AppendUintVarlen/digits=5-12 5.863n ± 0% 5.908n ± 1% ~ (p=0.075 n=20)
AppendUintVarlen/digits=6-12 6.137n ± 0% 6.117n ± 1% ~ (p=0.857 n=20)
AppendUintVarlen/digits=7-12 7.367n ± 0% 7.366n ± 0% ~ (p=0.784 n=20)
AppendUintVarlen/digits=8-12 7.369n ± 0% 7.381n ± 0% ~ (p=0.159 n=20)
AppendUintVarlen/digits=9-12 7.795n ± 2% 7.749n ± 0% ~ (p=0.180 n=20)
AppendUintVarlen/digits=10-12 9.208n ± 1% 8.661n ± 0% -5.94% (p=0.000 n=20)
AppendUintVarlen/digits=11-12 9.479n ± 1% 8.984n ± 0% -5.22% (p=0.000 n=20)
AppendUintVarlen/digits=12-12 9.784n ± 0% 9.229n ± 1% -5.67% (p=0.000 n=20)
AppendUintVarlen/digits=13-12 10.035n ± 1% 9.504n ± 0% -5.29% (p=0.000 n=20)
AppendUintVarlen/digits=14-12 10.89n ± 1% 10.35n ± 0% -4.96% (p=0.000 n=20)
AppendUintVarlen/digits=15-12 11.12n ± 0% 10.61n ± 1% -4.67% (p=0.000 n=20)
AppendUintVarlen/digits=16-12 12.29n ± 0% 11.85n ± 1% -3.62% (p=0.000 n=20)
AppendUintVarlen/digits=17-12 12.32n ± 0% 11.85n ± 1% -3.85% (p=0.000 n=20)
AppendUintVarlen/digits=18-12 12.80n ± 0% 12.32n ± 1% -3.79% (p=0.000 n=20)
AppendUintVarlen/digits=19-12 14.62n ± 1% 13.71n ± 1% -6.29% (p=0.000 n=20)
AppendUintVarlen/digits=20-12 14.83n ± 0% 13.93n ± 0% -6.10% (p=0.000 n=20)
geomean 9.102n 8.843n -2.84%
Change-Id: Ic8c79b472d5c30dccc1d974b47647f6425618e00
Reviewed-on: https://go-review.googlesource.com/c/go/+/714161
Auto-Submit: Russ Cox <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>1 parent 9bbda7c commit d2c5fa0
1 file changed
+9
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
| |||
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 168 | + | |
179 | 169 | | |
180 | 170 | | |
181 | 171 | | |
| |||
215 | 205 | | |
216 | 206 | | |
217 | 207 | | |
218 | | - | |
| 208 | + | |
219 | 209 | | |
220 | 210 | | |
221 | 211 | | |
222 | 212 | | |
223 | | - | |
| 213 | + | |
224 | 214 | | |
225 | 215 | | |
226 | | - | |
| 216 | + | |
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
| |||
275 | 265 | | |
276 | 266 | | |
277 | 267 | | |
278 | | - | |
| 268 | + | |
279 | 269 | | |
280 | 270 | | |
281 | | - | |
| 271 | + | |
282 | 272 | | |
283 | 273 | | |
284 | 274 | | |
| |||
295 | 285 | | |
296 | 286 | | |
297 | 287 | | |
298 | | - | |
| 288 | + | |
299 | 289 | | |
300 | 290 | | |
301 | 291 | | |
302 | | - | |
| 292 | + | |
303 | 293 | | |
304 | 294 | | |
305 | | - | |
| 295 | + | |
306 | 296 | | |
307 | 297 | | |
308 | 298 | | |
0 commit comments