diff options
| author | Robert Griesemer <gri@golang.org> | 2014-10-02 12:53:51 -0700 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2014-10-02 12:53:51 -0700 |
| commit | 1dba6eb4645f0528ed1ce5e0dd5a4661afa8bd07 (patch) | |
| tree | d367694a095108482c12aeafa5cf51dc33d53891 /src/runtime | |
| parent | f9d7e139552b186f4c68a3a87b470847167a9076 (diff) | |
| download | go-1dba6eb4645f0528ed1ce5e0dd5a4661afa8bd07.tar.xz | |
encoding/binary: fix error message
In the process, simplified internal sizeOf and
dataSize functions. Minor positive impact on
performance. Added test case.
benchmark old ns/op new ns/op delta
BenchmarkReadSlice1000Int32s 14006 14122 +0.83%
BenchmarkReadStruct 2508 2447 -2.43%
BenchmarkReadInts 921 928 +0.76%
BenchmarkWriteInts 2086 2081 -0.24%
BenchmarkWriteSlice1000Int32s 13440 13497 +0.42%
BenchmarkPutUvarint32 28.5 26.3 -7.72%
BenchmarkPutUvarint64 81.3 76.7 -5.66%
benchmark old MB/s new MB/s speedup
BenchmarkReadSlice1000Int32s 285.58 283.24 0.99x
BenchmarkReadStruct 27.90 28.60 1.03x
BenchmarkReadInts 32.57 32.31 0.99x
BenchmarkWriteInts 14.38 14.41 1.00x
BenchmarkWriteSlice1000Int32s 297.60 296.36 1.00x
BenchmarkPutUvarint32 140.55 151.92 1.08x
BenchmarkPutUvarint64 98.36 104.33 1.06x
Fixes #6818.
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/149290045
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
