3 ms·
Is this true? I'm not sure about C, but it's definitely the case that Go compiles magnitudes faster than C++, for any reasonable sized project. For example, t
by robfig 13y ago
Is this true?
I'm not sure about C, but it's definitely the case that Go compiles magnitudes faster than C++, for any reasonable sized project. For example, the ~200k lines of Go standard library compiles in about 14 seconds on my workstation, while random C++ libraries frequently take much longer (just my anecdotal impression from waiting on "brew install").
- deleted 13y ago[deleted]
- pjmlp 13y agoC++ compiles pretty slow due to templates being in the header files, and the need to re-parse them in every compilation unit. Also the language is quite complex and requires multiple analyses at parse time to decide what the developer is really trying to do. C code can be compiled fast if not many optimizations are being made. For example the Tiny C compiler was compiling the Linux kernel around 15s in 2004, not sure about which modules were configured though. Any proper compiler for a language with modules should anyway be able to beat C and C++ compilers hands down.
- ternaryoperator 13y agoThe slowness of C++ compilation is more complicated than you imply. Walter Bright details the causes here: http://www.drdobbs.com/228701711 http://www.drdobbs.com/228701711
- pjmlp 13y agoI know, but that is why Walter's information is an article and not a plain simple post. There is too much compiler related information to discuss.