top | item 11606182

Go devel compile times below 2x Go 1.4.3

31 points| microtonal | 10 years ago |groups.google.com | reply

21 comments

order
[+] MustardTiger|10 years ago|reply
How is the compiler for such a simplistic language so slow? The optimizing ocaml compiler is 5-10x faster, and is compiling a much more advanced language, complete with features developed in the 1970s even.
[+] lobster_johnson|10 years ago|reply
I don't doubt that OCaml is faster — but how do you know this to be true? Are there benchmarks comparing equivalent programs in Go and OCaml?

In this particular case, the discussion is about a program that imports around 500 package dependencies and is compiling everything (as I understand it) from scratch, resulting in a binary that is around 90MB.

[+] apeace|10 years ago|reply
EDIT: This is incorrect, see reply below.

> since gri's switched to making binary export/import the default, and a few followups from khr the time to build jujud compared to 1.4.3 is now solidly below 2x

If anyone else is curious like I was, I believe this is referring to a recent Go change [1] which was previously discussed on HN [2].

However, I can't find the corresponding commit in the Juju repo.

[1] https://github.com/golang/go/commit/af6aa0fd745d48c2db70712e...

[2] https://news.ycombinator.com/item?id=11593663

[+] foepys|10 years ago|reply
Why is the default Go compile command (go build) only single-threaded and is always compiling everything from scratch? That has always been my biggest issue with Go and they didn't even fix this with the switch to a pure Go compiler.
[+] Goranek|10 years ago|reply
use go install to cache packages
[+] feylikurds|10 years ago|reply
I am very critical of this assertion. I am currently developing a multiplayer game with websockets in Go, and the compile times do not at all seem to be less than 1.4. I am using 1.6.
[+] CJefferson|10 years ago|reply
The headline is confusing. It says the slowdown is now less than twice!
[+] f2f|10 years ago|reply
read what the post said. less than twice the compile times of 1.4, and that's for tip, not 1.6. 1.6 is way worse.
[+] nedsma|10 years ago|reply
I did recently (using Go 1.5) a comparison between three major development platforms using almost the same hardware. Go compilation times were best on OSX 10.11, followed by Ubuntu 15 and Win 8.1, all x64 systems. Anyone observed the same?
[+] pjmlp|10 years ago|reply
Yeah, but from the forum discussion it is 139 seconds for compiling 512 packages!

Compiling a C or C++ project with 512 translation units would probably take enough time to prepare a full meal.