Slow performance compared to C++, ideas?

deadalnix deadalnix at gmail.com
Sat Jun 8 04:18:32 PDT 2013


On Saturday, 8 June 2013 at 10:55:37 UTC, Dicebot wrote:
> On Saturday, 8 June 2013 at 10:34:17 UTC, deadalnix wrote:
>> On Saturday, 8 June 2013 at 10:22:42 UTC, Dicebot wrote:
>>> On Saturday, 8 June 2013 at 06:33:48 UTC, deadalnix wrote:
>>>> ...
>>>
>>> Btw, are there any reasons why "export" can't be applied on 
>>> per-method basis instead of whole classes?
>>
>> For final method, no problem, but for virtual method, it is 
>> either all or nothing, as they share the same virtual table.
>
> I don't see an issue. Non-export virtual methods can be 
> implicitly final if compiler/linker finds so. It does not 
> matter if they are in virtual table if no virtual table look-up 
> happens. Any micro-example to clarify?

It does matter that all parties agree on the layout of the 
virtual table.

Virtual method are never linked, it don't makeany sens to export 
them or not.

Even if no lookup for a given function is present, it is still 
important, because its presence change the layout of the virtual 
table, and so the lookup of other virtual methods.


More information about the Digitalmars-d mailing list