Slow performance compared to C++, ideas?
Steven Schveighoffer
schveiguy at yahoo.com
Wed Jun 5 18:00:33 PDT 2013
On Wed, 05 Jun 2013 20:49:00 -0400, deadalnix <deadalnix at gmail.com> wrote:
> 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.
This was circa 2003. Look at the state of Java from then. And also
consider that when the *decision* was made to make non-virtual the
default, was considerably before then.
-Steve
More information about the Digitalmars-d
mailing list