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

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Feb 12 12:56:01 PST 2013


13-Feb-2013 00:39, Sparsh Mittal пишет:
> I am finding C++ code is much faster than D code.

Seems like DMD's floating point issue. The issue being that it always 
works with floats as full-width reals + rounding. Basically if nothing 
changed (and I doubt it changed) then  DMD with floating point code is 
about two (or more) times slower then GDC/LDC.

The cure is using GDC/LDC compiler as they are pretty stable and up to 
date on the front-end side these days.

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list