D vs C++ - Where are the benchmarks?

Peter Alexander peter.alexander.au at gmail.com
Sun Jun 30 13:49:27 PDT 2013


On Sunday, 30 June 2013 at 19:48:45 UTC, Gabi wrote:
> The first question that came up was how it stands up with C++ 
> performance wise ?

D, like C++, is a natively ahead-of-time compiled language. D 
also has very similar modelling, abstraction capabilities, and 
idioms to C++. The end result is that D programs are typically as 
fast as C++ programs, sometimes faster, sometimes slower.

It does depend on the compiler though. LDC and GDC will typically 
produce considerably faster code than DMD.

It's also worth mentioned that D's garbage collector isn't quite 
state-of-the-art, so programs that make heavy use of the GC may 
perform poorly. This will definitely improve, and there are 
already existing better GC implementations out there.


More information about the Digitalmars-d mailing list