• Brad Fitzpatrick's avatar
    json: use strconv.Append variants to avoid allocations in encoding · 29264c6f
    Brad Fitzpatrick authored
    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
    29264c6f
Name
Last commit
Last update
..
ascii85 Loading commit data...
asn1 Loading commit data...
base32 Loading commit data...
base64 Loading commit data...
binary Loading commit data...
csv Loading commit data...
git85 Loading commit data...
gob Loading commit data...
hex Loading commit data...
json Loading commit data...
pem Loading commit data...
xml Loading commit data...