The metric is SPEED not just easier development
Posted Mar 27, 2008 10:03 UTC (Thu) by khim
In reply to: yet another +5
Parent article: Striking gold in binutils
If the metric is easier development because the language provides more sugar for certain patterns, how do you justify not using Java or C#?
Java and C# are using virtual machines and thus are slower. End of story. C is closer to the metal, but suffers from human problem: it's not feasible to generate 10'000 specialization by hand. You need some metaprogramming. If you'll take a look on really fast "C libraries" (like FFTW or ATLAS) you'll find out that while they include bunch of .c files these .c files are not the source! They itself are generated by some automatic process. C++ allows you to do something similar without using yet-another-specialized system (STL and especially boost are big help, but simple template metaprogramming works as well in simple cases). Thus in practice C++ programs written by good programmers are faster then C programs (if you turn of rtti and exceptions, of course). AFAICS this was reason for C++ usage in gold, too.
Of course it's very easy to misuse C++, too...
to post comments)