struct vs class benchmark (was Re: Give struct the status it deserves)
Derek Parnell
derek at psych.ward
Mon Mar 27 17:54:22 PST 2006
On Mon, 27 Mar 2006 17:23:05 -0700, Hasan Aljudy wrote:
> 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.
I understand.
To make them equivalent, use the 'inout' calling convention for the struct.
Change to 'void fooS(inout S s)' and the timings are the same.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocracy!"
28/03/2006 12:51:07 PM
More information about the Digitalmars-d
mailing list