Slow performance compared to C++, ideas?

deadalnix deadalnix at gmail.com
Wed Jun 5 17:49:00 PDT 2013


On Wednesday, 5 June 2013 at 20:01:06 UTC, Kapps wrote:
> Anders Hejlsberg talks about why they decided to use final by 
> default in C# at http://www.artima.com/intv/nonvirtualP.html. 
> See the Non-Virtual is the Default section. They do this 
> *because* they saw the drawbacks of Java's virtual by default 
> and were able to learn from it.
>

The first point : Anders Hejlsberg: There are several reasons. 
One is performance. We can observe that as people write code in 
Java, they forget to mark their methods final. Therefore, those 
methods are virtual. Because they're virtual, they don't perform 
as well. There's just performance overhead associated with being 
a virtual method. That's one issue.

It is blatantly false. Maybe it was true at the time, I don't 
know, but I find quite disturbing that the first argument is 100% 
moot.


More information about the Digitalmars-d mailing list