Features that Make the D Programming Language Better than C++ > Faster Compilation Time
You're looking at a single item and its comments from this list.
See all items.
I compared two projects that were both near 15KLoC on Windows, using DMD 1.056 and Visual C++ 2008 compilers, both were built on a P4 2.8ghz with 1GB ram with debug info enabled and optimizations disabled.
DMD 1.056: 4 seconds
Visual C++ 2008: 132 seconds
If someone has a more scientific comparison, please edit/replace this item with your results. However, with an order of magnitude (33x) difference in compilation time, it's safe to say that D is much faster. This translates to direct productivity.
DMD 1.056: 4 seconds
Visual C++ 2008: 132 seconds
If someone has a more scientific comparison, please edit/replace this item with your results. However, with an order of magnitude (33x) difference in compilation time, it's safe to say that D is much faster. This translates to direct productivity.
Comments
It is partly a language feature because the syntax is cleaner, for example, not having the template <template <>> operators confusion. This slows down parsing. No doubt there are other language differences as well which make it faster.
132 seconds for 15kLoC? I might believe that for 150kLoC, but 15k? You must either be running a very slow computer, a very template-heavy project, or a project that relies on a LOT of external libraries and header files.
This isn't a language feature though. This is a tools issue. If we're going to be talking about tools, one can mention that C++ has better IDEs, a greater variety of other development tools, and more libraries to choose from when starting a new project.
"with an order of magnitude (33x) "
A 33 times improvement is 2 1/2 orders of magnitude.
A 33 times improvement is 2 1/2 orders of magnitude.
Oops, 1 1/2 orders. Now I understand you missed it....
I like D and abhor C++, and compiling D is surely faster than compiling C++, but this is sheer idiocy; a single comparison of some code of unknown character says nothing, especially when the numbers are so absurd.
"not having the template <template <>> operators confusion. This slows down parsing"
That is so so stupid. How does it slow down parsing? There are many problems with using <> as template brackets, but parsing speed is not one of them.
"This isn't a language feature though. This is a tools issue."
Wrong; the language is explicitly designed for fast compilation, e.g., it doesn't require symbol table lookup to categorize tokens, and there are no header files to be parsed.
"not having the template <template <>> operators confusion. This slows down parsing"
That is so so stupid. How does it slow down parsing? There are many problems with using <> as template brackets, but parsing speed is not one of them.
"This isn't a language feature though. This is a tools issue."
Wrong; the language is explicitly designed for fast compilation, e.g., it doesn't require symbol table lookup to categorize tokens, and there are no header files to be parsed.