Inherent code performance advantages of D over C?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 7 07:42:55 PST 2013


On 12/6/13 11:34 PM, Maxim Fomin wrote:
> And again, notice that you are speaking about 'hypothetical advantages'
> (language advantages) which implies two things:
> 1) current efficiency is worse when comparing with some benchmark
> 2) despite many years of development, community failed to realize these
> advantages.
>
> This makes me think that probably there is another reason of why code is
> less efficient, for example fundamental characteristics of the language
> make him hard to be quick. This is not bad per se, but saying that
> language code can be faster than C, taking into account some many
> problems with D, looks like advertisement, rather then technical
> comparison.

That is not advertisement, and your tenor is dissonant in this forum. 
This community, as pretty much any other languages', is looking for 
strategic advantages compared to other languages, and how to exploit 
them. It is perfectly natural to look for places where D semantics may 
lead to better code and exploit those at their best.

D code is easy to make fast. This has been shown numerous times in 
various contexts. There are also convenience features that are not aimed 
at performance, bugs, and insufficiencies. Enumerating them in an 
attempt to argue that D code is not or cannot be faster than C is 
missing the point.


Andrei



More information about the Digitalmars-d mailing list