On Sun, 08 Feb 2009 18:20:47 +0300, Denis Koroskin <[email protected]> wrote:

On Sun, 08 Feb 2009 18:09:41 +0300, naryl <[email protected]> wrote:

It's a bit offtopic but I'd be grateful if someone can explain why D with structs completes this simple benchmark (see attachment) so slowly compared to C++ with classes on stack:

D struct - 27.85s
C++ stack - 8.32s

D class - 271.58s
C++ heap - 249.32s

Compiled with "dmd -O". -release decreases performance by 10% in this case. -inline doesn't affects it at all.

Well, you don't compare C++ vs D struct speed but rather C++ vs D IO.
I believe writefln is a bottleneck.


Nevermind, I didn't understand the benchmark from quick glance.

Reply via email to