D 50% slower than C++. What I'm doing wrong?

Marco Leise Marco.Leise at gmx.de
Tue Apr 24 06:27:09 PDT 2012


Am Sat, 14 Apr 2012 19:31:40 -0700
schrieb Jonathan M Davis <jmdavisProg at gmx.com>:

> On Sunday, April 15, 2012 04:21:09 Joseph Rushton Wakeling wrote:
> > On 14/04/12 23:03, q66 wrote:
> > > He also uses a class. And -noboundscheck should be automatically induced
> > > by
> > > -release.
> > 
> > ... but the methods are marked as final -- shouldn't that substantially
> > reduce any speed hit from using class instead of struct?
> 
> In theory. If they don't override anything, then that signals to the compiler 
> that they don't need to be virtual, in which case, they _shouldn't_ be 
> virtual, but that's up to the compiler to optimize, and I don't know how good 
> it is about that right now.

<cynicism>
May I point to this: http://d.puremagic.com/issues/show_bug.cgi?id=7865
</cynicism>

-- 
Marco



More information about the Digitalmars-d-learn mailing list