Why is this D code slower than C++?

Bradley Smith digitalmars-com at baysmith.com
Tue Jan 16 20:28:59 PST 2007


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: raytracer3_cpp_d.zip
Type: application/octet-stream
Size: 20344 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20070116/2e7061b8/attachment.obj 


More information about the Digitalmars-d-learn mailing list