struct vs class benchmark (was Re: Give struct the status it

Dave Dave_member at pathlink.com
Mon Mar 27 16:56:16 PST 2006


In article <e09vl7$2u5f$1 at digitaldaemon.com>, Hasan Aljudy says...
>
>Derek Parnell wrote:
>> Classes are slower than structs. Prove otherwise. I'm happy to be shown  
>> that I'm wrong.
>> 
>
>Note: I don't believe this to be a valid benchmark, but I believe it's 
>just as valid as Hong's benchmark.
>
>It's designed to make the class version win.
>

That wasn't my intention <g> I just wanted to point out that classes can have an
advantage as well.

I think Don Clungston's recent post regarding optimizing temp. creation out of
things like opAdd could solve many concerns about having to use structs in place
of classes because of heap allocation bottlenecks.

- Dave





More information about the Digitalmars-d mailing list