strconv: simplified logic resulting in faster float formatting
benchmark old ns/op new ns/op delta BenchmarkFormatFloatDecimal 300 283 -5.67% BenchmarkFormatFloat 383 381 -0.52% BenchmarkFormatFloatExp 359 357 -0.56% BenchmarkFormatFloatNegExp 357 358 +0.28% BenchmarkFormatFloatBig 468 430 -8.12% BenchmarkAppendFloatDecimal 104 92.5 -11.06% BenchmarkAppendFloat 199 190 -4.52% BenchmarkAppendFloatExp 172 167 -2.91% BenchmarkAppendFloatNegExp 172 169 -1.74% BenchmarkAppendFloatBig 280 235 -16.07% BenchmarkAppendFloat32Integer 104 92.4 -11.15% BenchmarkAppendFloat32ExactFraction 168 171 +1.79% BenchmarkAppendFloat32Point 206 199 -3.40% BenchmarkAppendFloat32Exp 167 167 +0.00% BenchmarkAppendFloat32NegExp 167 166 -0.60% BenchmarkAppendFloat64Fixed1 134 129 -3.73% BenchmarkAppendFloat64Fixed2 144 136 -5.56% BenchmarkAppendFloat64Fixed3 138 134 -2.90% BenchmarkAppendFloat64Fixed4 145 138 -4.83% Change-Id: Ia143840cb34cbd1cebd6b691dd0a45b7264b406c Reviewed-on: https://go-review.googlesource.com/3920Reviewed-by: Alan Donovan <adonovan@google.com>
Showing
Please
register
or
sign in
to comment