3 ms·
Generally the Go runtime (garbage collector, scheduler, allocator, etc) alone is 2-5MB, for additional context.
by weberc2 7y ago
Generally the Go runtime (garbage collector, scheduler, allocator, etc) alone is 2-5MB, for additional context.
- f2f 7y agoa bit less: $ cat > t.go package main func main() {} $ go build t.go $ ls -l t -rwxr-xr-x 1 f2f staff 1101432 24 Jul 23:19 t
- zimpenfish 7y agoAnd you can drop that down to ~775k by using `strip`. [rjp@hostname tmp]$ ls -l gosize -rwxr-xr-x 1 rjp rjp 1126905 Jul 25 07:00 gosize [rjp@hostname tmp]$ strip gosize [rjp@hostname tmp]$ ls -l gosize -rwxr-xr-x 1 rjp rjp 793704 Jul 25 07:00 gosize [rjp@hostname tmp]$ go version go version go1.12.7 linux/amd64
- weberc2 7y agoNot sure, but is it possible that the runtime (or parts thereof) isn’t linked in in that example?