Inherent code performance advantages of D over C?

Walter Bright newshound2 at digitalmars.com
Fri Dec 6 17:10:04 PST 2013


On 12/6/2013 4:40 PM, Manu wrote:
> Assuming a comparison to C++,

This is a comparison to C; a comparison to C++ is something else.

> you know perfectly well that D has a severe
> disadvantage. Unless people micro-manage final (I've never seen anyone do this
> to date), then classes will have significantly inferior performance to C++.
> C++ coders don't write virtual on everything. Especially not trivial accessors
> which must be inlined.

I know well that people used to C++ will likely do this. However, one can get in 
the habit of by default adding "final:" as the first line in a class definition, 
and then the compiler will tell you which ones need to be made virtual.


More information about the Digitalmars-d mailing list