How does Go compile so quickly?

Evan Kroske picture Evan Kroske · Jun 4, 2010 · Viewed 58k times · Source

I've Googled and poked around the Go website, but I can't seem to find an explanation for Go's extraordinary build times. Are they products of the language features (or lack thereof), a highly optimized compiler, or something else? I'm not trying to promote Go; I'm just curious.

Answer

Igor Krivokon picture Igor Krivokon · Jun 4, 2010

Dependency analysis.

The Go FAQ used to contain the following sentence:

Go provides a model for software construction that makes dependency analysis easy and avoids much of the overhead of C-style include files and libraries.

While the phrase is not in the FAQ anymore, this topic is elaborated upon in the talk Go at Google, which compares the dependency analysyis approach of C/C++ and Go.

That is the main reason of fast compilation. And this is by design.