permacomputing

Source repository for the main permacomputing wiki site
git clone http://git.permacomputing.net/repos/permacomputing.git # read-only access
Log | Files | Refs

commit dbceb4df6144d6fb4abbe1dbbe708901338f3a8e
parent 372b154f69ea7df60500cffeb48976fcb15c51a1
Author: decentral1se <decentral1se@web>
Date:   Sat,  3 Aug 2024 14:57:19 +0200

bloated binaries

Diffstat:
MGo.mdwn | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/Go.mdwn b/Go.mdwn @@ -11,3 +11,5 @@ The loading of program dependencies is based on URLs. This implies always-on int Go can be [[bootstrapped|bootstrapping]] with Go, or C (via `gccgo`/`gollvm`). However, with the introduction of generics, not all new version of Go can be bootstrapped with C. `gccgo` supports [up to 1.18](https://go.dev/doc/install/gccgo). This may be a useful version to target when considering compatibility with unported systems. There are [language design decisions](https://tinygo.org/docs/concepts/faq/why-a-new-compiler/) which make Go unsuitable for embedded systems. The [TinyGo](https://tinygo.org) project aims to provide an alternative. + +Go binary sizes are [generally acknowledged](https://github.com/golang/go/issues/6853) to be "bloated". For example, a binary size of [1.3 MB for 6 lines of code](https://dr-knz.net/go-executable-size-visualization-with-d3.html). The design of Go prioritises performance at the cost of memory, embedding considerable amounts of information in produced binaries. Passing flags such as `-ldflags="-s -w"` to `go build` can aid in size reduction.