diff options
| author | Tim Cooper <tim.cooper@layeh.com> | 2018-06-05 21:05:11 -0300 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-08-21 02:10:52 +0000 |
| commit | 352583ff774d33539aeef4a3ce471406880b586d (patch) | |
| tree | c215bcba328dfd3aa517df7508a2a2732635f3c0 /src/encoding/json/encode.go | |
| parent | 00379be17e63a5b75b3237819392d2dc3b313a27 (diff) | |
| download | go-352583ff774d33539aeef4a3ce471406880b586d.tar.xz | |
encoding/hex: pre-allocate Dump buffer
name old time/op new time/op delta
Dump/256-4 7.76µs ± 2% 5.82µs ± 2% -24.91% (p=0.008 n=5+5)
Dump/1024-4 28.4µs ± 2% 22.6µs ± 3% -20.58% (p=0.008 n=5+5)
Dump/4096-4 112µs ± 2% 88µs ± 0% -20.80% (p=0.016 n=5+4)
Dump/16384-4 444µs ± 3% 361µs ± 7% -18.73% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
Dump/256-4 4.00kB ± 0% 1.39kB ± 0% -65.20% (p=0.008 n=5+5)
Dump/1024-4 16.2kB ± 0% 5.5kB ± 0% -66.04% (p=0.008 n=5+5)
Dump/4096-4 63.9kB ± 0% 20.6kB ± 0% -67.78% (p=0.008 n=5+5)
Dump/16384-4 265kB ± 0% 82kB ± 0% -69.00% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
Dump/256-4 7.00 ± 0% 3.00 ± 0% -57.14% (p=0.008 n=5+5)
Dump/1024-4 9.00 ± 0% 3.00 ± 0% -66.67% (p=0.008 n=5+5)
Dump/4096-4 11.0 ± 0% 3.0 ± 0% -72.73% (p=0.008 n=5+5)
Dump/16384-4 13.0 ± 0% 3.0 ± 0% -76.92% (p=0.008 n=5+5)
Change-Id: I0a0d6de315b979142b05e333880da8a5e52b12ef
Reviewed-on: https://go-review.googlesource.com/116495
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding/json/encode.go')
0 files changed, 0 insertions, 0 deletions
