Re:The Performance Impact of C++'s `final` Keyword
by saagarjha on Tuesday April 23, 2024 @06:03AM
(#40130238)
In C++ virtual functions are polymorphic and indirected, with the target not known to the compiler. Devirtualization gives the compiler this information (in this case a final method cannot be overridden and branch to something else).
Funny how things work. From working with Julia I've built a good intuition for guessing when functions would be inlined. And yet, I've never heard the word devirtualization until now.