• Rémy Oudompheng's avatar
    cmd/gc, runtime: inline append in frontend. · 045dbeaf
    Rémy Oudompheng authored
    A new transformation during walk turns append calls
    into a combination of growslice and memmove.
    
    benchmark                     old ns/op    new ns/op    delta
    BenchmarkAppend                     141          141   +0.00%
    BenchmarkAppend1Byte                 18           11  -39.56%
    BenchmarkAppend4Bytes                19           10  -42.63%
    BenchmarkAppend7Bytes                18           10  -42.16%
    BenchmarkAppend8Bytes                18           10  -40.44%
    BenchmarkAppend15Bytes               19           11  -41.67%
    BenchmarkAppend16Bytes               19           11  -41.97%
    BenchmarkAppend32Bytes               23           14  -38.82%
    BenchmarkAppendStr1Byte              14           10  -23.78%
    BenchmarkAppendStr4Bytes             14           11  -21.13%
    BenchmarkAppendStr8Bytes             14           10  -25.17%
    BenchmarkAppendStr16Bytes            19           11  -41.45%
    BenchmarkAppendStr32Bytes            18           14  -19.44%
    BenchmarkAppendSpecialCase           62           63   +1.77%
    
    R=golang-dev, khr, cshapiro, rsc, dave
    CC=golang-dev
    https://golang.org/cl/12815046
    045dbeaf
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
compress Loading commit data...
container 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...
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...
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...