Makefile: remove DOCKER_BUILD_GOGC

This option was added in 9672afa339 in 2016,
at which time tweaking GOGC showed a significant difference when building
the binary (`1m14.221s` vs `0m49.929s`).

Testing this Today doesn't show a real difference;

With GOGC=1000:

    rm -rf bundles/
    time hack/make.sh binary
    real	0m15.303s
    user	0m26.285s
    sys	0m6.383s

    real	0m4.931s
    user	0m3.103s
    sys	0m1.670s

    real	0m5.693s
    user	0m3.827s
    sys	0m2.384s

Without GOGC set;

    real	0m5.012s
    user	0m3.689s
    sys	0m1.549s

    real	0m5.298s
    user	0m3.997s
    sys	0m1.695s

    real	0m4.899s
    user	0m3.579s
    sys	0m1.423s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-12-17 17:57:50 +01:00
parent d5c81b1c01
commit 81c170a696
3 changed files with 1 additions and 4 deletions

View File

@@ -14,8 +14,6 @@ BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
source "${MAKEDIR}/.go-autogen"
(
export GOGC=${DOCKER_BUILD_GOGC:-1000}
if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then
# must be cross-compiling!
if [ "$(go env GOOS)/$(go env GOARCH)" = "linux/arm" ]; then