ThinLTO is there. I think that should settle the final/virtual debate

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 3 19:09:12 PST 2016


On Sun, 04 Dec 2016 01:36:50 +0000, deadalnix wrote:
> LTO optimization can devirtualize all function that do not need to be
> virtual, and even use profile infos to speculatively devirtualize - aka
> JVM grade devirtualization.
> 
> I would love to see this leveraged to finally put to rest the final vs
> virtual debate. If we use this tech properly, everything that do not
> need to be virtual can be finalized - except across shared object, which
> shouldn't be too much of an issue in practice.

Unless someone can think of a compelling reason to shorten virtual 
function tables, anyway -- final member functions don't appear in 
vtables, but the linker can't remove them from the list.


More information about the Digitalmars-d mailing list