D slower than C++ by a factor of _two_ for simple raytracer (gdc)

downs default_357-line at yahoo.de
Fri Feb 15 03:13:16 PST 2008


downs wrote:
> bearophile wrote:
>>
>> If you can stand the ugliness, you can probably reduce your running time by 10-15% using my TinyVector structs instead of your Vec struct, you can find them in my d libs: (V.2.70 at the moment, their development is going well, http://www.fantascienza.net/leonardo/so/libs_d.zip ). That TinyVector comes from extensive testing of mine. You probably may require 10-20 minutes of time to adapt your raytracer to using TinyVector, but it's not too much difficult. The result will be ugly...
>>
>> Bye,
>> bearophile

To clarify: I know I can get the D code to be as fast as the C++ code if I optimize it more, or use custom structs, etc.

That's not the point. The point is getting a comparison of C++ and D using equivalent code.

But, again, thanks for the advice.



More information about the Digitalmars-d mailing list