Why is this D code slower than C++?

Lionello Lunesu lio at lunesu.remove.com
Tue Jan 16 23:20:52 PST 2007


Bradley Smith wrote:
> Jacco Bikker wrote several raytracing articles on DevMaster.net. I took 
> his third article and ported it to D. I was surprised to find that the D 
> code is approx. 4 times slower than C++.
> 
> The raytracer_d renders in approx. 21 sec and the raytracer_cpp renders 
> in approx. 5 sec. I am using the DMD and DMC compilers on Windows.
> 
> How can the D code be made to run faster?
> 
> Thanks,
>   Bradley
> 

Your build_d.bat is missing the -release flag? Don't know how much it 
will gain though.

L.


More information about the Digitalmars-d-learn mailing list