www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Programming language benchmark

reply Piotr Szturmaj <bncrbme jadamspam.pl> writes:
Hi,

I've just found this benchmark which includes GDC and LDC compilers. I 
don't know why there's no DMD flavor, though. Here's the link:

http://attractivechaos.wordpress.com/2011/06/22/my-programming-language-benchmark-analyses/

It clearly shows that D is really fast (comparable to C) which I like a 
lot! However, RegExp implementation is missing from D benchmark. Author 
"could not get it to work".

Piotr
Jun 22 2011
parent reply bearophile <bearophileHUGS lycos.com> writes:
Piotr Szturmaj:

 I don't know why there's no DMD flavor, though.

The author of that bench has said:
I have not evaluated DMD because I am running the programs on a Linux server I
have no control of. The “libc” is quite old and incompatible with the binary
release of dmd.<

 It clearly shows that D is really fast (comparable to C) which I like a lot!

Only LDC and GDC. DMD is not up to GCC/ICC/LLVM even on integer math benchmarks. Bye, bearophile
Jun 22 2011
next sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On 22.06.2011 15:41, bearophile wrote:
 Piotr Szturmaj:

 I don't know why there's no DMD flavor, though.

 I have not evaluated DMD because I am running the programs on a Linux server I
have no control of. The “libc” is quite old and incompatible with the binary
release of dmd.<

 It clearly shows that D is really fast (comparable to C) which I like a lot!


I personally dislike the way author benchmarks regexes anyway, e.g. perl: while (<>) { chomp; print $_, "\n" if /$re/; } chomp?? and printing each line will get this test biased by performance of text printing facilities. Same things with C, gets and puts and chomping that have nothing to do with pattern matching: while (fgets(buf, BUF_SIZE - 1, stdin)) { ++l; for (q = buf; *q; ++q); if (q > buf) *(q-1) = 0;//was that triming '\n'? if (regexec(&r, buf, 10, match, 0) != REG_NOMATCH) puts(buf); }
 Only LDC and GDC. DMD is not up to GCC/ICC/LLVM even on integer math
benchmarks.

Mm, proof link? :)
 Bye,
 bearophile

-- Dmitry Olshansky
Jun 22 2011
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/22/11 6:52 AM, Dmitry Olshansky wrote:
 for (q = buf; *q; ++q); if (q > buf) *(q-1) = 0;//was that triming '\n'?

Now that's an interesting line. Andrei
Jun 22 2011
prev sibling parent Don <nospam nospam.com> writes:
bearophile wrote:
 Piotr Szturmaj:
 
 I don't know why there's no DMD flavor, though.

The author of that bench has said:
 I have not evaluated DMD because I am running the programs on a Linux server I
have no control of. The “libc” is quite old and incompatible with the binary
release of dmd.<

 It clearly shows that D is really fast (comparable to C) which I like a lot!

Only LDC and GDC. DMD is not up to GCC/ICC/LLVM even on integer math benchmarks.

I've never heard that claim before. Do you have evidence for that? If it is true, there's a strong possibility that it's a small, fixable issue (for example, DMD used to have terrible performance for ulong multiplication).
Jun 23 2011