Slow performance compared to C++, ideas?

Walter Bright newshound2 at digitalmars.com
Sat Jun 1 11:22:41 PDT 2013


On 5/30/2013 7:56 PM, Andrei Alexandrescu wrote:
> On 5/30/13 9:26 PM, finalpatch wrote:
>> https://dl.dropboxusercontent.com/u/974356/raytracer.d
>> https://dl.dropboxusercontent.com/u/974356/raytracer.cpp
>
> Manu's gonna love this one: make all methods final.

I have another suggestion. class Sphere and class Ray should be structs. Neither 
class uses polymorphism in any way, so there's no reason to make them classes 
with virtual functions.



More information about the Digitalmars-d mailing list