cmd/compile: use a bytes.Buffer to format symbols
No significant compiler speed changes, but some minor memory savings. Passes toolstash-check. name old alloc/op new alloc/op delta Template 36.3MB ± 0% 36.2MB ± 0% -0.25% (p=0.008 n=5+5) Unicode 28.3MB ± 0% 28.2MB ± 0% -0.16% (p=0.008 n=5+5) GoTypes 122MB ± 0% 121MB ± 0% -0.39% (p=0.008 n=5+5) Compiler 568MB ± 0% 566MB ± 0% -0.21% (p=0.008 n=5+5) SSA 1.95GB ± 0% 1.95GB ± 0% -0.08% (p=0.008 n=5+5) Flate 22.8MB ± 0% 22.8MB ± 0% -0.21% (p=0.008 n=5+5) GoParser 28.0MB ± 0% 27.9MB ± 0% -0.38% (p=0.008 n=5+5) Reflect 78.6MB ± 0% 78.3MB ± 0% -0.33% (p=0.008 n=5+5) Tar 34.1MB ± 0% 34.1MB ± 0% -0.19% (p=0.008 n=5+5) XML 44.3MB ± 0% 44.2MB ± 0% -0.19% (p=0.008 n=5+5) [Geo mean] 79.9MB 79.7MB -0.24% name old allocs/op new allocs/op delta Template 363k ± 0% 359k ± 0% -1.21% (p=0.008 n=5+5) Unicode 329k ± 0% 326k ± 0% -0.90% (p=0.008 n=5+5) GoTypes 1.28M ± 0% 1.25M ± 0% -2.62% (p=0.008 n=5+5) Compiler 5.39M ± 0% 5.31M ± 0% -1.45% (p=0.008 n=5+5) SSA 18.1M ± 0% 17.9M ± 0% -0.78% (p=0.008 n=5+5) Flate 228k ± 0% 226k ± 0% -0.97% (p=0.008 n=5+5) GoParser 295k ± 0% 288k ± 0% -2.26% (p=0.008 n=5+5) Reflect 949k ± 0% 932k ± 0% -1.74% (p=0.008 n=5+5) Tar 336k ± 0% 332k ± 0% -1.12% (p=0.008 n=5+5) XML 417k ± 0% 413k ± 0% -1.10% (p=0.008 n=5+5) [Geo mean] 818k 806k -1.42% Change-Id: Ibdb94650a761edec17d8eba0abdfb70a8a495da9 Reviewed-on: https://go-review.googlesource.com/c/go/+/222920 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:Robert Griesemer <gri@golang.org>
Loading
Please sign in to comment