5 ms·
Go devel compile times below 2x Go 1.4.3
- apeace 11y agoEDIT: 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/af6aa0fd745d48c2db70712ebfe6833d30a9a85d#diff-ed59a16ce24322f4a023f5af3845333eR530 https://github.com/golang/go/commit/af6aa0fd745d48c2db70712e... [2] https://news.ycombinator.com/item?id=11593663 https://news.ycombinator.com/item?id=11593663
- feylikurds 11y agoI 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 11y agoThe headline is confusing. It says the slowdown is now less than twice!
- f2f 11y agoread 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.
- MustardTiger 11y agoHow 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 11y agoI 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.
- MustardTiger 11y ago>Are there benchmarks comparing equivalent programs in Go and OCaml? Yes. Go was nearly as bad as java and C++ in 2014, and it has gotten nearly twice as slow since then. And yet "compiler performance" is the excuse for not having generics. While C++ and java both have them and are now faster than go's compiler, and ocaml is way faster and has them. http://forum.nim-lang.org/t/682 http://forum.nim-lang.org/t/682
- lobster_johnson 11y ago> Yes. Please do provide them. The notion that Go's compiler is slower than C++ is ridiculous. Go's compiler, despite the recent slowdown, is still famously fast, whereas C++'s notorious header file problem means that even small changes can trigger huge recompiles (which is exacerbated by the fact that templates must often have their implementation code in the header file, not the implementation file). Meanwhile, Rust's compiler is much, much slower than Go's, and probably not much faster than GCC/Clang with C++.
- MustardTiger 11y agoI just linked to one in the post you replied to. And it shows clearly that 2014 go is almost as bad as C++ and java.
- nedsma 11y agoI 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?
- foepys 11y agoWhy 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 11y agouse go install to cache packages
- pjmlp 11y agoYeah, 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.