summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-08-21 16:25:00 -0700
committerShentubot <shentubot@google.com>2018-08-21 16:26:32 -0700
commite29a02239eb27d4fe03e04f9fbdbc46e1655bf95 (patch)
treeda1ac9b51713c7f53fa6272a80587be365bb8a7e /pkg/p9
parentae68e9e7513083411875110bd31bd89ac3a58cb7 (diff)
binary: append slices
A new optimization in Go 1.11 improves the efficiency of slice extension: "The compiler now optimizes slice extension of the form append(s, make([]T, n)...)." https://tip.golang.org/doc/go1.11#performance-compiler Before: BenchmarkMarshalUnmarshal-12 2000000 664 ns/op 0 B/op 0 allocs/op BenchmarkReadWrite-12 500000 2395 ns/op 304 B/op 24 allocs/op After: BenchmarkMarshalUnmarshal-12 2000000 628 ns/op 0 B/op 0 allocs/op BenchmarkReadWrite-12 500000 2411 ns/op 304 B/op 24 allocs/op BenchmarkMarshalUnmarshal benchmarks the code in this package, BenchmarkReadWrite benchmarks the code in the standard library. PiperOrigin-RevId: 209679979 Change-Id: I51c6302e53f60bf79f84576b1ead4d36658897cb
Diffstat (limited to 'pkg/p9')
0 files changed, 0 insertions, 0 deletions