]> Cypherpunks repositories - gostls13.git/commit
strconv: simplify code for binary exponent float format
authorMartin Möhrmann <martisch@uos.de>
Fri, 13 Feb 2015 14:59:54 +0000 (15:59 +0100)
committerRobert Griesemer <gri@golang.org>
Thu, 5 Mar 2015 16:52:41 +0000 (16:52 +0000)
commitd5b5d6702ad7d64f189c915225b945a2aa471a38
tree5a97a8907d45cacc50312ce295beb55ffcc60184
parent84f53339befccbb4c3449955e205a6a727282f10
strconv: simplify code for binary exponent float format

Use optimized formatBits function to format mantissa and exponent.
Add benchmark for binary exponent float format.

on darwin/386

benchmark                         old ns/op     new ns/op     delta
BenchmarkAppendFloatBinaryExp     520           122           -76.54%

on darwin/amd64

benchmark                         old ns/op     new ns/op     delta
BenchmarkAppendFloatBinaryExp     76.9          84.3          +9.62%

Change-Id: If543552f1960e1655bed3a4130914e5eaa3aac69
Reviewed-on: https://go-review.googlesource.com/5600
Reviewed-by: Robert Griesemer <gri@golang.org>
src/strconv/ftoa.go
src/strconv/ftoa_test.go