Descriptionstrconv: use a variable buffer size for decimal representations.
Fast cases usually only needed a small fraction of the previous
800-byte fixed size buffer.
old ns/op new ns/op diff
BenchmarkAtof64Decimal 327 192 -41%
BenchmarkAtof64Float 382 247 -35%
BenchmarkAtof64FloatExp 429 299 -30%
BenchmarkAtof64Big 710 582 -18%
BenchmarkAppendFloatDecimal 472 345 -27%
BenchmarkAppendFloat 483 357 -26%
BenchmarkAppendFloatExp 496 369 -26%
BenchmarkAppendFloatNegExp 485 361 -25%
BenchmarkAppendFloatBig 646 520 -19%
Patch Set 1 #Patch Set 2 : diff -r 7ec969250bfc https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 7ec969250bfc https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 518f09c59498 https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 5 : code review 5503085: strconv: use a variable buffer size for decimal represe... #MessagesTotal messages: 10
|