FAQ
The most important difference with the likes of GCC, is that Go has a sane
and very simple dependency model. The compiler needs to compile each
referenced package once, and only once. Whereas GCC and friends will
happily parse the same header hundreds, even thousands of times over for no
reason except stupid design. This creates an exponential slowdown and leads
to builds taking hours.

On Saturday, October 13, 2012 10:05:24 PM UTC+2, Archos wrote:

Ago some time, when I installed Rust, I remember that it took a long time.
I've measured the time now in linux/amd64.

Rust took 50 minutes in compiling a few commands and libraries:

install: /usr/local/bin/rustc
install: /usr/local/bin/cargo
install: /usr/local/bin/rustdoc
install: /usr/local/lib/librustrt.so
install_lib: /usr/local/lib/libcore-*.so
install_lib: /usr/local/lib/libstd-*.so
install_lib: /usr/local/lib/librustc-*.so
install_lib: /usr/local/lib/libsyntax-*.so
install: /usr/local/lib/librustllvm.so
install: /usr/local/share/man/man1/rustc.1
install: /usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so
install_lib:
/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-*.so
install_lib:
/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-*.so
install_lib:
/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/librustc-*.so
install_lib:
/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libsyntax-*.so
install:
/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libmorestack.a

In change, Go took only 2 minutes in building the compiler, the C/Go
bootstrap tool, all packages and commands, testing packages and another
tests.

Robert Griesemer, one of designers of Go, comes from Wirth's school of
compilers. So, is Go using the compiler technique that Niklaus Wirth
describes in this book[1]?

[1]: http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf
--

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2021 Grokbase