D vs C++ - Where are the benchmarks?

bearophile bearophileHUGS at lycos.com
Sun Jun 30 17:02:44 PDT 2013


Gabi:

> The first question that came up was how it stands up with C++ 
> performance wise ?

In my experience if you write D code very similar to equivalent C 
or C++ code (this means using abstractions with enough care), and 
you use the ldc2 compiler with the right compilation switches 
(some of them are hidden), and you don't make mistakes in D 
coding (like leaving virtual functions, copying fixed static 
arrays when you want just a reference, and so on), then you get 
sufficiently similar performance to C or C++ code compiled with 
Clang.

Bye,
bearophile


More information about the Digitalmars-d mailing list