Slow performance compared to C++, ideas?

Juan Manuel Cabo juanmanuel.cabo at gmail.com
Fri May 31 19:59:45 PDT 2013


On 05/31/2013 10:27 PM, Jonathan M Davis wrote:
> On Saturday, June 01, 2013 09:04:50 Manu wrote:
>> **applause**
>> Someone other than me said it, out loud!
>> This is a magnificent day! :)
> 
> Well, the discussions at dconf convinced me. Certainly, at this point, I think 
> that the only semi-viable excuse for not making functions non-virtual by 
> default is the code breakage that it would cause, and given how surprisingly 
> minimal that is, I think that it's definitely worth it - especially when the 
> kind of folks whose code Walter is most worried about breaking are the guys 
> most interested in the change.
> 
> - Jonathan M Davis
> 


Making everything final by default would IMO kind of break
automated mock classes generation for unit testing,
automatic proxy class generation for DB entities, and
other OOP niceities.

And it wasn't just marking methods final which got the
D version of the raytracer in this thread faster than
the C++ version in the end. (it was a combination of
four or five things, which involved a bit of unrolling,
avoiding array literals, and so on).

--jm




More information about the Digitalmars-d mailing list