Re:Go compiler: Initial support for concurrent backend compi...
by azinman2 on Thursday April 13, 2017 @08:25PM
(#14111845)
Details on the CL are a little thin, and the "don't believe the hype" indicates this isn't automatically some big win. Can someone give more details?
[ Parent
| on HN ]
Re:Go compiler: Initial support for concurrent backend compi...
by gpm on Thursday April 13, 2017 @10:10PM
(#14112274)
A reason I've heard against parallelizing compilers is that you get parallelism for free in large builds as your build system will build separate code-gen units (files in C, crates in rust, I believe in go it's packages) that don't depend on eachother in parallel anyways. Adding it to the compiler as well just creates synchronization overhead.
Re:Go compiler: Initial support for concurrent backend compi...
by weberc2 on Friday April 14, 2017 @12:30AM
(#14112705)
Still, the benchmarks seem promising. 40% improvement on std lib packages is nothing to shake a stick at. The end of the CL explains that this is a best case scenario, one that will mostly benefit recompilation of a single package, which is the most common compilation activity.
Re:Go compiler: Initial support for concurrent backend compi...
by DSMan195276 on Thursday April 13, 2017 @11:43PM
(#14112591)
I would agree. Basically all decent build systems will allow you to compile units that aren't dependent on each other in parallel. Threading the compiler may provide some gains, but it's likely that for a good portion of your build time your CPU is already fully utilized anyway (And without any locking overhead).
I feel like the real gains would be with a threaded linker instead, but I can't say I have any data to back that up. But I mean, you can't link until everything is compiled, so presumably there are free CPU cores that could be used.
Re:Go compiler: Initial support for concurrent backend compi...
by uluyol on Thursday April 13, 2017 @11:52PM
(#14112612)
Go's compilation unit is a package, not a file. This limits the amount of parallelism you can get compared to say C outside of the compiler. You have bottleneck packages like the runtime which have to be compiled before other packages, and in the case where you do incremental compilation you probably only have a few packages to compile anyway. Some of this is briefly touched on in the CL (see comments on the amount of concurrently that should be enabled), and there are issues on the bug tracker that go into more detail.
Re:Go compiler: Initial support for concurrent backend compi...
by obstinate on Friday April 14, 2017 @08:41AM
(#14114105)
Since most builds are incremental and only touch a single package, this should still be a win. And it may be a win whenever there is just one package on the critical path. (I don't know if go packages must be built after their dependencies, but it stands to reason if so.)
Re:Go compiler: Initial support for concurrent backend compi...
by bradfitz on Friday April 14, 2017 @12:45AM
(#14112737)
Josh is modest and knew I'd tweet about it so we was being defensive. :)
Re:Go compiler: Initial support for concurrent backend compi...
by euyyn on Thursday April 13, 2017 @08:36PM
(#14111886)
If you click "Show more", that's the longest CL description I've ever seen :)
Re:Go compiler: Initial support for concurrent backend compi...
by nishs on Thursday April 13, 2017 @09:16PM
(#14112052)
Beats rsc's commit message [0] by 158 words :)
[0] https://github.com/golang/go/commit/b902a63ade47cf69218c9b38...
Re:Go compiler: Initial support for concurrent backend compi...
by stock_toaster on Thursday April 13, 2017 @08:42PM
(#14111911)
Did you click "show more" on the commit comment? Much of the CL details are simply hidden below the fold, as it were.
Re:Go compiler: Initial support for concurrent backend compi...
by azinman2 on Thursday April 13, 2017 @08:50PM
(#14111942)
Ah I didn't see that. Thanks!
Re:Go compiler: Initial support for concurrent backend compi...
by chrisseaton on Thursday April 13, 2017 @08:59PM
(#14111982)
What's a CL?
Re:Go compiler: Initial support for concurrent backend compi...
by timothya on Thursday April 13, 2017 @09:08PM
(#14112021)
"Changelist".
Similar words are commit, diff, patch, etc. (though sometimes those other words have other implications)
Re:Go compiler: Initial support for concurrent backend compi...
by agumonkey on Friday April 14, 2017 @06:36AM
(#14113643)
Thanks, I was deep off, Cell Line (reading too much genetics these days).. Compiling Level
Re:Go compiler: Initial support for concurrent backend compi...
by jaffee on Thursday April 13, 2017 @09:38PM
(#14112155)
On github, it'd be called a "pull request".
Re:Go compiler: Initial support for concurrent backend compi...
by nowbacktowork on Thursday April 13, 2017 @10:00PM
(#14112235)
I believe in this case it's Change Log.