It is certainly a micro-benchmark. I just wanted to ask in case it was expected since I use golang on ARM based embedded systems a lot and they tend to be sensitive to binary size. In the tests, my binary is stripped (-ldflags="-w -s"), so I wouldn't think the size difference is related to the changes that were made to add additional DWARF info, etc. When I checked the cross compiled Linux ARM 7 sizes for the hello world program, they are also up in go1.9 beta.
go version go1.8.3 darwin/amd64 $ GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-w -s" dozer2:test Parker$ ls -l total 1824 -rw-r--r-- 1 Parker staff 79 Jun 16 18:47 main.go -rwxr-xr-x 1 Parker staff 928608 Jun 30 06:37 test go version devel +eab99a8 Mon Jun 26 21:12:22 2017 +0000 darwin/amd64 $ GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-w -s" $ ls -l total 2176 -rw-r--r-- 1 Parker staff 79 Jun 16 18:47 main.go -rwxr-xr-x 1 Parker staff 1107256 Jun 30 06:36 test Checking the hello world HTTP server program: package main import ( "net/http" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello world!")) }) panic(http.ListenAndServe(":8080", nil)) } The size is also up a bit from go1.8 -> go1.9 on both darwin amd64 and linux_arm (7), though a smaller percentage than the basic hello world. go version go1.8.3 darwin/amd64 $ go build -ldflags="-w -s" $ ls -l total 8344 -rw-r--r-- 1 Parker staff 204 Jun 30 06:44 main.go -rwxr-xr-x 1 Parker staff 4264852 Jun 30 06:47 test $ GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-w -s" $ ls -l total 6344 -rw-r--r-- 1 Parker staff 204 Jun 30 06:44 main.go -rwxr-xr-x 1 Parker staff 3242224 Jun 30 06:48 test go version devel +eab99a8 Mon Jun 26 21:12:22 2017 +0000 darwin/amd64 $ go build -ldflags="-w -s" $ ls -l total 8880 -rw-r--r-- 1 Parker staff 204 Jun 30 06:44 main.go -rwxr-xr-x 1 Parker staff 4538852 Jun 30 06:45 test $ GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-w -s" $ ls -l total 6664 -rw-r--r-- 1 Parker staff 204 Jun 30 06:44 main.go -rwxr-xr-x 1 Parker staff 3405040 Jun 30 06:46 test I can check it out for bigger/more realistic programs as well. ~Parker On Thursday, June 29, 2017 at 8:21:18 AM UTC-4, Alberto Donizetti wrote: > > But if you have other numbers please share them, it'll certainly interesing > to see them. > > Il giorno giovedì 29 giugno 2017 13:38:18 UTC+2, Parker Evans ha scritto: >> >> Congratulations on the Beta 2 release, pretty excited to test it out. >> Lots of interesting updates! >> >> I did notice one thing when I was playing around with Beta 1 and now Beta >> 2 that I wanted to ask about. Is it expected that binary size would >> increase in this release? A toy example that has been somewhat of a >> benchmark in previous releases is the simple hello world program: >> >> package main >> >> import ( >> >> "fmt" >> >> ) >> >> >> func main() { >> >> fmt.Println("Hello world!") >> >> } >> >> It seems like this program, when compiled with options to strip debugging >> information has grown about 20% in size when compiled natively for macOS: >> >> go version go1.8.3 darwin/amd64 >> >> $ go build -ldflags="-w -s" >> >> $ ls -l >> >> total 2320 >> >> -rw-r--r-- 1 Parker staff 79 Jun 16 18:47 main.go >> >> -rwxr-xr-x 1 Parker staff 1181728 Jun 29 07:24 test >> >> go version devel +eab99a8 Mon Jun 26 21:12:22 2017 +0000 darwin/amd64 >> >> $ go build -ldflags="-w -s" >> >> $ ls -l >> >> total 2792 >> >> -rw-r--r-- 1 Parker staff 79 Jun 16 18:47 main.go >> >> -rwxr-xr-x 1 Parker staff 1424992 Jun 29 07:11 test >> >> Anyone have any insight on whether this is expected and if a similar >> increase should be expected across the board in this release? >> >> Thanks, >> Parker >> >> On Monday, June 26, 2017 at 6:11:46 PM UTC-4, Chris Broadfoot wrote: >>> >>> Hello gophers, >>> >>> We have just released go1.9beta2, a beta version of Go 1.9. >>> It is cut from the master branch at the revision tagged go1.9beta2. >>> >>> There are no known problems or regressions. >>> Please try running production load tests and your unit tests with the >>> new version. >>> Your help testing these pre-release versions is invaluable. >>> >>> Report any problems using the issue tracker: >>> https://golang.org/issue/new >>> >>> If you have Go installed already, the easiest way to try go1.9beta2 >>> is by using this tool: >>> https://godoc.org/golang.org/x/build/version/go1.9beta2 >>> >>> You can download binary and source distributions from the usual place: >>> https://golang.org/dl/#go1.9beta2 >>> >>> To find out what has changed in Go 1.9, read the draft release notes: >>> https://tip.golang.org/doc/go1.9 >>> >>> Documentation for Go 1.9 is available at: >>> https://tip.golang.org/ >>> >>> Cheers, >>> Chris >>> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.