1
0
mirror of https://github.com/golang/go synced 2024-10-05 11:41:22 -06:00
go/src
Martin Möhrmann 5a9c128a03 fmt: remove math package dependency and avoid float operations
Remove floating point comparisons and rely only on the information
directly provided by appendFloat.
Make restoring the zero padding flag explicit instead of using a defer.
Rearrange some case distinctions to remove duplicated code.
Add more test cases for zero padded floating point numbers with sign.

benchmark                   old ns/op     new ns/op     delta
BenchmarkSprintfFloat-4     187           180           -3.74%

Change-Id: Ifa2ae85257909f40b1b18118c92b516933271729
Reviewed-on: https://go-review.googlesource.com/19721
Reviewed-by: Rob Pike <r@golang.org>
2016-02-19 22:55:30 +00:00
..
archive archive/zip: handle pre-zip64 zip files containing 2³²-1-byte content 2016-02-02 16:36:59 +00:00
bufio bufio: clarify Read docs 2015-12-01 20:05:25 +00:00
builtin
bytes bytes: document that buffer is reused in Truncate and Reset 2015-12-18 19:40:58 +00:00
cmd cmd/compile: refactor import statement parsing 2016-02-19 22:54:15 +00:00
compress build: shorten a few packages with long tests 2015-12-29 15:46:44 +00:00
container
crypto crypto/rsa: expand on documentation and add some examples. 2016-01-27 00:11:22 +00:00
database/sql database/sql: implement Scan of time.Time, document, clarify Scan error text 2016-01-27 07:37:17 +00:00
debug debug/dwarf: fix nil pointer dereference in cyclic type structures 2016-01-14 02:05:31 +00:00
encoding all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
errors
expvar
flag
fmt fmt: remove math package dependency and avoid float operations 2016-02-19 22:55:30 +00:00
go cmd/compile: make -A and -newexport compatible 2016-02-19 21:42:04 +00:00
hash cmd/internal/obj/x86: add new instructions, cleanup. 2016-01-13 14:04:44 +00:00
html text/template,html/template: correct comment in DefinedTemplates 2015-11-24 21:52:36 +00:00
image image/color: have NYCbCrA.RGBA work in 16-bit color. 2015-12-24 06:55:33 +00:00
index/suffixarray
internal net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
io io/ioutil: add examples to functions 2015-11-30 19:47:18 +00:00
log log/syslog: document that syslog is frozen 2016-01-05 22:56:07 +00:00
math all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
mime all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
net all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
os all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
path all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
reflect reflect: document DeepEqual, fix case of maps with NaN keys 2015-12-11 05:50:05 +00:00
regexp all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
runtime runtime: skip cgo check for non-pointer slice elements 2016-02-19 16:07:27 +00:00
sort sort: Fix typo in stable sort comment 2016-02-18 19:20:41 +00:00
strconv
strings
sync sync: deflake TestWaitGroupMisuse3 2016-02-03 20:03:32 +00:00
syscall cmd/compile: recognize Syscall-like functions for liveness analysis 2016-01-14 01:16:45 +00:00
testing testing: move comment inside T.Parallel 2016-01-06 17:59:55 +00:00
text all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
time all: replace strings.Index with strings.Contains where possible 2016-02-19 01:06:05 +00:00
unicode unicode/utf8: add test for FullRune 2015-12-01 10:39:06 +00:00
unsafe unsafe: fix typo in documentation of valid Pointer->uintptr->Pointer conversions 2016-01-29 00:41:27 +00:00
vendor net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: use consistent shebang line 2016-01-14 03:16:20 +00:00
buildall.bash build: test linux/mips64 and linux/mips64le with buildall.bash 2016-01-19 04:43:44 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash src: remove reference to since-deleted dist -s flag 2015-12-17 22:03:56 +00:00
make.bat
Make.dist
make.rc
nacltest.bash
race.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
race.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bash cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.bat cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00
run.rc cmd/dist: make test default to --no-rebuild 2015-12-29 15:20:00 +00:00