On 09/20/2011 09:44 PM, Chris Dew wrote:
I've found some links which show that D used to be in the
programming language shootout http://shootout.alioth.debian.org/

Why did it disappear from there and can we put it back?

It is a great sanity check for a new user to be able to see that a
language and its implementation aren't a dog.

I *expect* that D's performance is similar to C/C++ when used in the
same fashion (i.e. functions and structs, rather than classes and
delegates).  I would like to be able to confirm this.


DMDs optimizer is good but not as great as some of the modern C++ compilers. (the optimizer is really fast though, and as I hear it will get even faster) In my experience, gdc generates machine code that is just as fast as equivalent C++ code compiled with g++.

Basically, D code that does reasonably well at memory management is fast. And it is (way) easier to write fast D code than to write fast C++ code imho. Once the D compilers get more mature, I am sure that many D-specific optimizations will be added that cannot be performed on C++ code. (pure and immutable come to mind) Ds standard approach for substring computations (often needed for parsing) is also inherently faster than the standard C and C++ way, because it does not require to copy around that much data. As long as your delegates are scoped, using them often leads to superior performance, because they can save memory allocations.

I agree that it would be nice to have benchmarks that prove this. Recently, Dmitry Olshansky's new std.regex module has managed to outperform all the other implementations on the shootout at the regex-dna task. The module provides the (now still experimental) means to compile regexen to native machine code at compile time by using Ds advanced meta programming facilities.

Reply via email to