-
Daniel Martí authored
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>
9d1540b7