Should operator overload methods be virtual?

Walter Bright newshound1 at digitalmars.com
Tue Dec 1 11:17:10 PST 2009


Leandro Lucarella wrote:
> Walter Bright, el 28 de noviembre a las 13:31 me escribiste:
>> retard wrote:
>>> Is this again one of those features that is supposed to hide the
>>> fact that dmd & optlink toolchain sucks? At least gcc can optimize
>>> the calls in most cases where the operator is defined to be
>>> virtual, but is used in non-polymorphic manner.
>> The gnu linker (ld) does not do any optimizations of virtual call =>
>> direct call. Optlink has nothing to do with it.
> 
> The *new* GNU Linker (gold) does (with plug-ins, both GCC and LLVM
> provides plug-ins for gold to do LTO).
> 
> See:
> http://gcc.gnu.org/wiki/LinkTimeOptimization
> http://llvm.org/docs/GoldPlugin.html
> 

I don't see that particular one in the links.



More information about the Digitalmars-d mailing list