|
|
|
|
|
by rsc
1896 days ago
|
|
An easily obtained apples-to-apples¹ table: $ for i in $(seq 3 16); do
curl -sLo go1.$i.tgz https://golang.org/dl/go1.$i.linux-amd64.tar.gz
tar xzf go1.$i.tgz go/bin/gofmt
size=$(ls -l go/bin/gofmt | awk '{print $5}')
strip go/bin/gofmt
size2=$(ls -l go/bin/gofmt | awk '{print $5}')
echo go1.$i $size $size2
done
go1.3 3496520 2528664
go1.4² 14398336 13139184
go1.5 3937888 2765696
go1.6 3894568 2725376
go1.7 3036195 1913704
go1.8 3481554 2326760
go1.9 3257829 2190792
go1.10 3477807 2166536
go1.11 3369391 2441288
go1.12 3513529 2506632
go1.13 3543823 2552632
go1.14 3587746 2561208
go1.15 3501176 2432248
go1.16 3448663 2443736
$
Size fluctuates from release to release, but the overall trendline is flat: Go 1.16 binaries are roughly where Go 1.3 binaries were.At the moment, it looks like Go 1.17 binaries will get a bit smaller thanks to the new register ABI making executable code smaller (and faster). ¹ Well, not completely. The gofmt code itself was changing from release to release, but not much. Most of the binary is the libraries and runtime, though, so it's still accurate for trends. ² Turns out we shipped the go 1.4 gofmt binary built with the race detector enabled! Oops. |
|