1
0
mirror of https://github.com/golang/go synced 2024-10-05 00:21:21 -06:00
go/src/pkg
Brad Fitzpatrick f1583bb956 encoding/json: allocate less in NewEncoder
The *Encoder is almost always garbage. It doesn't need an
encodeState inside of it (and its bytes.Buffer), since it's
only needed locally inside of Encode.

benchmark                 old ns/op    new ns/op    delta
BenchmarkEncoderEncode         2562         2553   -0.35%

benchmark                 old bytes    new bytes    delta
BenchmarkEncoderEncode          283          102  -63.96%

R=r
CC=gobot, golang-dev
https://golang.org/cl/9365044
2013-05-14 15:50:46 -07:00
..
archive archive/tar: skip NUL-filled unused octal fields 2013-05-15 04:40:42 +08:00
bufio bufio.Scan: don't stop after Read returns 0, nil 2013-04-18 17:37:21 -07:00
builtin builtin: document true and false. 2013-04-18 14:36:08 -07:00
bytes bytes: don't leave mprotect-ed pages after unsafe test. 2013-04-03 08:30:20 -07:00
compress compress/gzip: add Writer.Flush to call flate.Writer's Flush 2013-04-02 09:07:43 -07:00
container container/heap: fix int overflow bug 2013-03-04 10:25:21 -05:00
crypto crypto/rand: better panic message for invalid Int argument. 2013-04-17 23:21:15 -07:00
database/sql database/sql: remove an unused field from Rows 2013-05-06 15:16:47 -07:00
debug debug/elf: repair GNU version symbols. 2013-03-22 01:27:55 +01:00
encoding encoding/json: allocate less in NewEncoder 2013-05-14 15:50:46 -07:00
errors
expvar all: make tests able to run multiple times. 2013-01-27 00:24:09 +01:00
flag all: make tests able to run multiple times. 2013-01-27 00:24:09 +01:00
fmt fmt: fix crash for Printf("%.", 3) 2013-04-29 13:52:07 -07:00
go go/token: let FileSet.AddFile take a negative base 2013-05-14 09:30:13 -07:00
hash build: update assembly variable names for vet 2013-03-22 12:57:55 -04:00
html build: remove dead code 2013-03-22 17:28:22 -04:00
image image: minor update of comments. 2013-05-14 13:28:16 -07:00
index/suffixarray
io io: explain what (0,nil) means from Read 2013-04-18 17:36:25 -07:00
log log/syslog: fix race in test between channel close and accept. 2013-02-28 07:48:16 +01:00
math math/rand: fix typo and add better crash message 2013-04-27 18:50:38 -07:00
mime mime/multipart: don't strip leading space/tab in quoted-printable decoding 2013-04-17 20:04:58 -07:00
net net/http: Fix basic authentication with empty password 2013-05-14 15:33:46 -07:00
os os/exec: disable TestExtraFilesFDShuffle 2013-04-30 13:17:37 -07:00
path all: Skip AllocsPerRun tests if GOMAXPROCS>1. 2013-03-06 15:52:32 -08:00
reflect reflect: document the unreliability of StringHeader and SliceHeader 2013-04-07 18:42:47 -07:00
regexp regexp: doc fix 2013-05-02 18:59:39 -07:00
runtime runtime/race: improve public documentation 2013-05-13 10:28:12 +04:00
sort sort: don't depend on math 2013-04-20 17:20:41 -07:00
strconv strconv: remove some test TODOs and adjust malloc limits lower 2013-04-04 17:04:18 -07:00
strings bytes,strings: remove user name from BUG in comment 2013-03-19 15:04:18 -07:00
sync sync, sync/atomic: do not corrupt race detector after a nil dereference. 2013-04-08 23:46:54 +02:00
syscall syscall: fix prototype of Fchflags (API change) 2013-05-07 05:20:00 +08:00
testing testing/iotest: rephrase DataErrReader's description 2013-04-12 16:08:56 -07:00
text text/template: comment fix 2013-05-03 14:22:34 -07:00
time time: stop 1ns timer in test 2013-04-26 11:08:50 +04:00
unicode unicode: modify a comment to the convention format. 2013-03-19 14:47:41 -04:00
unsafe unsafe: fix a typo 2012-10-19 16:35:15 +11:00