• 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
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-qemu.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...