Go programming language originates to 2007, with its public appearance in 2009. As any other programming language, it is growing and changing.
In our company, we use Go a lot. Our system is a combination of different micro services and is deployed over internet. Every update is done over internet also, testing is done over internet, pair development is done over internet, … everything is done over internet.
And that is the reason we like to have our binaries as small as possible. From one point of view, we are not wasting network resources. From different point of view, we are not wasting our time, waiting for the transfer to complete.
We did two things to make our binaries smaller. At first, we changed our builds to use -ldflags=”-s -w”
. Then we started to use upx.
Both steps helped us a lot.
And because we are not perfect, there are still some installation running legacy code, that was not updated, from different reasons. Someone someday asked a simple question. How much those executables differ, if you compare one Go version to another? Will it make sense to update those installations running legacy code?
So we made a comparison of Go executables, from the size point of view. Because we started to use Go in production from version 1.7.x, this comparison also starts with version 1.7.x.
#golang #go #programming