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

NVolcz via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 4 11:49:15 PST 2016


On Sunday, 4 December 2016 at 01:36:50 UTC, deadalnix wrote:
> First, presentation:
> https://www.youtube.com/watch?v=9OIEZAj243g
>
> Some of this is available in LLVM today, and everything 
> presented here will be in 4.0 . The long story short: ThinLTO 
> can do most of what LTO does but with a price that is much 
> closer to the one of a regular build than the one of a classic 
> LTO build.
>
> 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.

My understanding was that the main argument for final by default 
was that it is easy to make the wrong decision for a method to be 
virtual and then going from virtual to final would break the 
compatibility.


More information about the Digitalmars-d mailing list