• Lynn Boger's avatar
    cmd/compile: add rules to improve consecutive byte loads and stores on ppc64le · bb1fd3b5
    Lynn Boger authored
    This adds new rules to recognize consecutive byte loads and
    stores and lowers them to loads and stores such as lhz, lwz, ld,
    sth, stw, std. This change only covers the little endian cases
    on little endian machines, such as is found in encoding/binary
    UintXX or PutUintXX for little endian. Big endian will be done
    later.
    
    Updates were also made to binary_test.go to allow the benchmark
    for Uint and PutUint to actually use those functions because
    the way they were written, those functions were being
    optimized out.
    
    Testcases were also added to cmd/compile/internal/gc/asm_test.go.
    
    Updates #22496
    
    The following improvement can be found in golang.org/x/crypto
    
    poly1305:
    
    Benchmark64-16              142           114           -19.72%
    Benchmark1K-16              1717          1424          -17.06%
    Benchmark64Unaligned-16     142           113           -20.42%
    Benchmark1KUnaligned-16     1721          1428          -17.02%
    
    chacha20poly1305:
    
    BenchmarkChacha20Poly1305Open_64-16     1012       885   -12.55%
    BenchmarkChacha20Poly1305Seal_64-16     971        836   -13.90%
    BenchmarkChacha20Poly1305Open_1350-16   11113      9539  -14.16%
    BenchmarkChacha20Poly1305Seal_1350-16   11013      9392  -14.72%
    BenchmarkChacha20Poly1305Open_8K-16     61074      53431 -12.51%
    BenchmarkChacha20Poly1305Seal_8K-16     61214      54806 -10.47%
    
    Other improvements of around 10% found in crypto/tls.
    
    Results after updating encoding/binary/binary_test.go:
    
    BenchmarkLittleEndianPutUint64-16     1.87      0.93      -50.27%
    BenchmarkLittleEndianPutUint32-16     1.19      0.93      -21.85%
    BenchmarkLittleEndianPutUint16-16     1.16      1.03      -11.21%
    
    Change-Id: I7bbe2fbcbd11362d58662fecd907a0c07e6ca2fb
    Reviewed-on: https://go-review.googlesource.com/74410
    Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMichael Munday <mike.munday@ibm.com>
    bb1fd3b5
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
cmd Loading commit data...
compress Loading commit data...
container Loading commit data...
context Loading commit data...
crypto Loading commit data...
database/sql Loading commit data...
debug Loading commit data...
encoding Loading commit data...
errors Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
hash Loading commit data...
html Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
internal Loading commit data...
io Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
os Loading commit data...
path Loading commit data...
plugin Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
runtime Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
testing Loading commit data...
text Loading commit data...
time Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...
vendor/golang_org/x Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
androidtest.bash Loading commit data...
bootstrap.bash Loading commit data...
buildall.bash Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
cmp.bash Loading commit data...
iostest.bash Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
naclmake.bash Loading commit data...
nacltest.bash Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...