Finding large difference b/w execution time of c++ and D codes for same problem

FG home at fgda.pl
Tue Feb 12 14:17:20 PST 2013


On 2013-02-12 21:39, Sparsh Mittal wrote:
> I am finding C++ code is much faster than D code.

I had a look, but first had to make juliaValue global, because g++ had optimized 
all the calculations away. :)  Also changed DIM to 32 * 1024.

13.2s -- g++ -O3
16.0s -- g++ -O2
15.9s -- gdc -O3
15.9s -- gdc -O2
16.2s -- dmd -O -release -inline    (v.2.060)

Winblows and DMD 32-bit, the rest 64-bit, but still, dmd was quite fast.
Interesting how gdc -O3 gave no extra boost vs. -O2.



More information about the Digitalmars-d-learn mailing list