Hacker News new | past | comments | ask | show | jobs | submit login

Do most people using Go in production use the Plan9-derived Go compilers or GCC? Are there any realistic programs where the Plan9-derived compilers generate better code?



I dare say that the Plan9-derived compilers are used predominantly on all platforms they support.

As for code performance, GccGo atleast seems to have the upper hand in code which doesn't rely much on the runtime functionality, but not by very much on the (admittedly few) tests I've done compared to the Go 1.1 6g compiler.

That said, AFAIK GccGo doesn't yet have the improvements made to the Go runtime in 1.1, so chances are it will beat the Go 1.1 6g compiler even in runtime reliant code once those improvements make it into GccGo.

Even so, the official 'plan9-derived' compilers have been improving greatly during their relatively short existance, and as they are the main target of optimizations/improvement aswell as being 'Go specific' they will likely end up generating faster code for Go in all scenarios.

I see GccGo mainly as a solution for platforms to which Go hasn't yet been ported (or perhaps never will), and I think it will remain as such. The main focus, and practically all the end usage will be on that of the official compiler suite.

It will be interesting to see how much more performance they can squeeze out of Go compiler optimization, GccGo has proven that there is more to be had.

I would also like to see profile guided optimization on the Go compilers, I've had cpu intensive code where GCC has given me 10%-20% better performance on PGO builds (this was not Go code, I don't know if GccGo supports PGO?).


Many of the optimizations in gccgo are going to be hard to port to a compiler that doesn't use SSA form. Go has a very reasonable reason to not use an SSA-based IR--compiler performance--but I think it'll be hard to perform the same kinds of optimizations without regressing compile time performance. (If they can do it, though, my hat is off to them!)


The vast majority of users use the Plan 9-derived compilers.


Everyone I know uses gc. The only reason why I once considered using gccgo was because gc isn't available on Solaris. Changed jobs in the end, though, so don't have to use Solaris anymore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: