diff options
| author | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-03-01 11:40:36 -0500 |
|---|---|---|
| committer | Lynn Boger <laboger@linux.vnet.ibm.com> | 2018-05-08 13:15:39 +0000 |
| commit | 28edaf4584c4cbfb0ed03692108ebc90db039d17 (patch) | |
| tree | a1d6687f9c222134537e01e946cef8f2413e05b0 /src/encoding/binary/binary.go | |
| parent | f31a18ded405bdbc7b44a011d1434c83e7c39347 (diff) | |
| download | go-28edaf4584c4cbfb0ed03692108ebc90db039d17.tar.xz | |
cmd/compile,test: combine byte loads and stores on ppc64le
CL 74410 added rules to combine consecutive byte loads and
stores when the byte order was little endian for ppc64le. This
is the corresponding change for bytes that are in big endian order.
These rules are all intended for a little endian target arch.
This adds new testcases in test/codegen/memcombine.go
Fixes #22496
Updates #24242
Benchmark improvement for encoding/binary:
name old time/op new time/op delta
ReadSlice1000Int32s-16 11.0µs ± 0% 9.0µs ± 0% -17.47% (p=0.029 n=4+4)
ReadStruct-16 2.47µs ± 1% 2.48µs ± 0% +0.67% (p=0.114 n=4+4)
ReadInts-16 642ns ± 1% 630ns ± 1% -2.02% (p=0.029 n=4+4)
WriteInts-16 654ns ± 0% 653ns ± 1% -0.08% (p=0.629 n=4+4)
WriteSlice1000Int32s-16 8.75µs ± 0% 8.20µs ± 0% -6.19% (p=0.029 n=4+4)
PutUint16-16 1.16ns ± 0% 0.93ns ± 0% -19.83% (p=0.029 n=4+4)
PutUint32-16 1.16ns ± 0% 0.93ns ± 0% -19.83% (p=0.029 n=4+4)
PutUint64-16 1.85ns ± 0% 0.93ns ± 0% -49.73% (p=0.029 n=4+4)
LittleEndianPutUint16-16 1.03ns ± 0% 0.93ns ± 0% -9.71% (p=0.029 n=4+4)
LittleEndianPutUint32-16 0.93ns ± 0% 0.93ns ± 0% ~ (all equal)
LittleEndianPutUint64-16 0.93ns ± 0% 0.93ns ± 0% ~ (all equal)
PutUvarint32-16 43.0ns ± 0% 43.1ns ± 0% +0.12% (p=0.429 n=4+4)
PutUvarint64-16 174ns ± 0% 175ns ± 0% +0.29% (p=0.429 n=4+4)
Updates made to functions in gcm.go to enable their matching. An existing
testcase prevents these functions from being replaced by those in encoding/binary
due to import dependencies.
Change-Id: Idb3bd1e6e7b12d86cd828fb29cb095848a3e485a
Reviewed-on: https://go-review.googlesource.com/98136
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/encoding/binary/binary.go')
0 files changed, 0 insertions, 0 deletions
