Why Java (server VM) is faster than D?

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 3 10:05:59 PDT 2015


On 8/3/15 12:59 PM, Dmitry Olshansky wrote:
> On 03-Aug-2015 19:54, Steven Schveighoffer wrote:

>> ALSO, make SURE you are compiling in release mode, so you aren't calling
>> a virtual invariant function before/after every call.
>
> This one is critical. Actually why do we have an extra call for trivial
> null-check on any object that doesn't even have invariant?

Actually, that the call to the invariant should be avoidable if the 
object doesn't have one. It should be easy to check the vtable pointer 
to see if it points at the "default" invariant (which does nothing).

-Steve



More information about the Digitalmars-d mailing list