why does the go compiler produce large binaries?
For example, after compiling the following code, I get exec 1.8 MB file
package main
import "fmt"
func main(){
fmt.Println("Hello World")
}
I tested the above code on both Ubuntu and Win7 , and the result will be the same!
I also wrote a large program with +70 lines of code, and the resulting binary was unexpectedly again 1.8 MB again (in fact, the difference in bytes was a bit). I am wondering what is dumped to the binary by the Go compiler.
source
share