4 ms·
As someone else commented, the huge size of Go executables is down to a design decision to include a map of functions for panic reporting. There was a whole dis
by marcus_holmes 8y ago
As someone else commented, the huge size of Go executables is down to a design decision to include a map of functions for panic reporting. There was a whole discussion on this recently on HN.
I don't know why the grandparent was downvoted. Go binaries are not small and the claim that this is a "small" single executable is untrue.
Hopefully the Go team will give us a flag to decide for ourselves whether to optimise for executable size or initialisation time. I know I'm fed up of uploading 50Mb files over dodgy wifi+vpn connections to update my server.
(edit fix repetition of design)
- throwaway5d097 8y agoThat's one thing that might motivate me to set up CI/CD on a server.
- baldomo 8y agoYou can actually pass LDFLAGS to any go tool (e.g. go build[1]). The flags are specified in the linker documentation[2] [1] https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies https://golang.org/cmd/go/#hdr-Compile_packages_and_dependen... [2] https://golang.org/cmd/link/ https://golang.org/cmd/link/
- marcus_holmes 8y agowhich is useful, except as far as I'm aware it doesn't cover this case. The original is at: https://science.raphael.poss.name/go-executable-size-visualization-with-d3.html#overview https://science.raphael.poss.name/go-executable-size-visuali...