MIT Technology Review: An Interview With Bjarne Stroustrup

Walter Bright newshound at digitalmars.com
Tue Dec 5 15:44:45 PST 2006


zz wrote:
> I agree with everything you mention above but there are cases where C++ 
> will just be a better due to performance and nothing else.
> 
> I did some work in D recently that is being used at a client's place and 
> it took about 2 hours to design and write (it's was not something that 
> was performance critical), one of my work mates got interested in D and 
> for the sake of curiosity we ran some test comparing D's built in arrays 
> with boost::ptr_vector which we use quite a lot and the results were as 
> follows:
> VS2003 = ~3.75 secs
> VS2003 with NedMalloc = ~1.35 secs
> DMD = ~ 7 secs
> We could not get DMC to compile Nedmalloc so we dropped testing DMC with 
> c++.
> 
> While he liked that language and said the he might actually use it to 
> prototype idea's, he will not use it in production code due to the 
> performance.
> 
> Conclusions:
> D is great, but DMD will have to do something about it's performance for 
> some applications.

There are many possible explanations for this, and not all of them are 
because C++ has better performance. We need to see the code and the 
compiler switches used.

Here's a case where D is substantially faster than C++: 
http://www.digitalmars.com/d/cppbench.html



More information about the Digitalmars-d mailing list