6 ms·
So much for assembly language being the most compact and efficient form of software... (Yes, of course I know it's assembly for a VM, but still, there's NO exc
by dublin 5y ago
So much for assembly language being the most compact and efficient form of software... (Yes, of course I know it's assembly for a VM, but still, there's NO excuse for this kind of outrageous bloat!)
- pdpi 5y agoIt is compact and efficient. Problem is that there's a lot of it, because these payloads also have to include large chunks of Go's standard library. Apparently fmt and http are particularly large packages that will each add 1-2MB to your was binary.
- hbn 5y agoThe runtime alone is also roughly 700kb, or at least was as of 2017 when this SO answer was written https://stackoverflow.com/a/46159048 https://stackoverflow.com/a/46159048 Not sure if anything's changed since then
- oefrha 5y agoWith go 1.17, a minimal program doing absolutely nothing when built with GOOS=js GOARCH=wasm go build -ldflags='-s -w' comes in at 1.2M raw, 362K gzipped, 276K brotli'ed (default compression levels).