Why is this D code slower than C++?
nobody_
spam at spam.spam
Wed Jan 17 14:26:56 PST 2007
I really hope you'll get it faster than the C++ variant.
Might -profile shed some light?
Or maybe I lurk here in learn for a reason :D
> Thanks for all the suggestions. It helps, but not enough to make the D
> code faster than the C++. It is now 2.6 times slower. The render times
> are now approx. 13 sec for raytracer_d and approx. 5 sec for
> raytracer_cpp.
>
> Here are the changes I've made. Attached is the new code.
>
> Call RegisterClass outside of assert. (Broken if -release used)
> Apply -release option. (Increases speed in an unknown way)
> Converted templates to regular functions. (Templates not being inlined)
> Manually inlined DOT function. (Function not being inlined)
>
>
> Any other suggestions?
More information about the Digitalmars-d-learn
mailing list