go: cmd/compile: slow compile/build compared to Go 1.4

It’s been a while, we still use 1.4 because of this issue, it affect to much to our build-test-debug cycle.

$ uname -a
Linux f9988 4.1.14-1-lts #1 SMP Thu Dec 10 21:34:50 CET 2015 x86_64 GNU/Linux

# go 1.1 and go 1.2 failed to compile github.com/yosuke-furukawa/json5/encoding/json5

$ rm -rf $GOPATH/pkg/* 2>1 > /dev/null; go version ; time go build
go version go1.3.3 linux/amd64

CPU: 5.35s      Real: 3.34s     RAM: 287316KB
CPU: 5.63s      Real: 3.40s     RAM: 287316KB
CPU: 5.87s      Real: 3.41s     RAM: 287272KB

$ rm -rf $GOPATH/pkg/* 2>1 > /dev/null; go version ; time go build
go version go1.4.2 linux/amd64

CPU: 5.83s      Real: 3.34s     RAM: 290024KB
CPU: 5.71s      Real: 3.45s     RAM: 290024KB
CPU: 5.96s      Real: 3.46s     RAM: 289948KB

$ rm -rf $GOPATH/pkg/* 2>1 > /dev/null; go version ; time go build
go version go1.5.2 linux/amd64

CPU: 21.93s     Real: 7.92s     RAM: 310148KB
CPU: 21.07s     Real: 7.46s     RAM: 318660KB
CPU: 21.45s     Real: 7.58s     RAM: 310160KB

packages from: http://seblu.net/a/archive/packages/g/go/

for comparison, it’s now as slow as gcc-go:

# for comparison:
$ rm -rf $GOPATH/pkg/* 2>1 > /dev/null; go version ; time go build
go version go1.4.2 gccgo (GCC) 5.3.0 linux/amd64

CPU: 20.76s     Real: 9.65s     RAM: 203212KB
CPU: 21.33s     Real: 9.83s     RAM: 203340KB
CPU: 21.09s     Real: 9.85s     RAM: 203336KB

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Much has been done on this in Go 1.8. There will be more in 1.9.

Much has been done on this in Go 1.7. There will be more in 1.8.