diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2018-07-07 19:07:14 +0100 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2018-08-22 16:14:05 +0000 |
| commit | 9d1540b77c3965f1cbaaab753d09974ad7330380 (patch) | |
| tree | aa1af876f4e666114d999725503a8adaa151c718 /src/plugin/plugin_dlopen.go | |
| parent | 841a9136b3d737d1252f7c5c371f109f23d76b2d (diff) | |
| download | go-9d1540b77c3965f1cbaaab753d09974ad7330380.tar.xz | |
encoding/json: simplify some pieces of the encoder
Some WriteByte('\\') calls can be deduplicated.
fillField is used in two occasions, but it is unnecessary when adding
fields to the "next" stack, as those aren't used for the final encoding.
Inline the func with its only remaining call.
Finally, unindent a default-if block.
The performance of the encoder is unaffected:
name old time/op new time/op delta
CodeEncoder-4 6.65ms ± 1% 6.65ms ± 0% ~ (p=0.662 n=6+5)
Change-Id: Ie55baeab89abad9b9f13e9f6ca886a670c30dba9
Reviewed-on: https://go-review.googlesource.com/122461
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/plugin/plugin_dlopen.go')
0 files changed, 0 insertions, 0 deletions
