News for hackers. Stuff that matters.
Re:The Performance Impact of C++'s `final` Keyword by paulddraper on Tuesday April 23, 2024 @11:18AM (#40132931)
> `final` does one specific thing: It tells a compiler that it can be sure that the given object is not going to have anything derive from it.

...and the compiler can optimize using that information.

(It could also do the same without the keyword, with LTO.)

Re:The Performance Impact of C++'s `final` Keyword by bluGill on Tuesday April 23, 2024 @12:15PM (#40133662)
LTO can only apply in specific situations though, if there is any possibility that a plugin derived from the class LTO can do nothing.