go/src/pkg/encoding/json
Brad Fitzpatrick 29264c6f4f json: use strconv.Append variants to avoid allocations in encoding
Before/after, best of 3:
json.BenchmarkCodeEncoder  10  183495300 ns/op  10.58 MB/s
->
json.BenchmarkCodeEncoder  10  133025100 ns/op  14.59 MB/s

But don't get too excited about this.  These benchmarks, while
stable at any point of time, fluctuate wildly with any line of
code added or removed anywhere in the path due to stack splitting
issues.

It's currently much faster, though, and this is the API that
doesn't allocate so should always be faster in theory.

R=golang-dev, dsymonds, rsc, r, gri
CC=golang-dev
https://golang.org/cl/5411052
2011-12-15 11:21:21 -08:00
..
testdata encoding/json: add marshal/unmarshal benchmark 2011-11-15 10:58:19 -05:00
Makefile
bench_test.go encoding/json: add marshal/unmarshal benchmark 2011-11-15 10:58:19 -05:00
decode.go use new strconv API 2011-12-05 15:48:46 -05:00
decode_test.go json: some tests to demonstrate bad error messages 2011-12-15 10:02:47 -08:00
encode.go json: use strconv.Append variants to avoid allocations in encoding 2011-12-15 11:21:21 -08:00
encode_test.go json: treat renamed byte slices the same as []byte 2011-12-14 11:03:28 -08:00
indent.go
scanner.go various: avoid func compare 2011-11-13 22:57:19 -05:00
scanner_test.go encoding/json: make BenchmarkSkipValue more consistent 2011-11-15 13:59:59 -05:00
stream.go
stream_test.go
tagkey_test.go
tags.go
tags_test.go