Hacker News new | ask | show | jobs
by bayindirh 1388 days ago
As far as I can see, GCCGo implements Go 1.18 as of today [0]. Moreover, as noted on official Golang webpage for GCCGo [1], there are even some advantages for using GCCGo, quoting:

"On x86 GNU/Linux systems the gccgo compiler is able to use a small discontiguous stack for goroutines. This permits programs to run many more goroutines, since each goroutine can use a relatively small stack. Doing this requires using the gold linker version 2.22 or later. You can either install GNU binutils 2.22 or later, or you can build gold yourself."

Considering GCC can optimize well written code to the point of saturating the target processor, given the correct target flags, I'm not entirely sure that "gc" would be "much" faster than GCCGo. I'm relatively new with Go, but equally old with GCC, esp. with g++, so assuming the optimization prowess is equally valid for GCCGo.

Last but not least, GCCGo is a part of GCC as a primary language since 4.7, which is an eternity in software terms.

[0]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgo/VERSION;h=...

[1]: https://go.dev/doc/install/gccgo

1 comments

It was in 2019 I doubt it changed but the default Go compiler is overall faster than GCCGO: https://meltware.com/2019/01/16/gccgo-benchmarks-2019.html