MIT Technology Review: An Interview With Bjarne Stroustrup

zz zz at zz.com
Tue Dec 5 16:11:27 PST 2006


Walter Bright wrote:
> 
> 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.

Walter, it's not a C++ vs D issue (I preffer D) it's a compiler/library 
issue.

I don't claim C++ has better performance, but that VS2003 does a better 
job than DMC/DMD when there lot of memory allocations and even better 
when combined with nedmalloc.

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

I'll have to run it under VS2003 or VS2005.

I'll post the trivial test we did tommorow, but in another test in C 
using VS2003 default allocator, the same code was much faster in VS2003 
under release then in DMC -o.

In the test we are doing new is called 1,000,000 times and the result 
put into a boost::ptr_vector in c++.

Zz



More information about the Digitalmars-d mailing list