|
|
|
|
|
by munificent
1156 days ago
|
|
That's true but devirtualization optimizations tend to be pretty brittle and it's very easy to fall of the optimizer's blessed path and end up back to doing to a virtual call without realizing it. Worse, once the devirtualization optimization has failed, any further optimizations you would get from inlining the call will also fail. If you're programming in C++, you probably do care about this level of performance, and in that case, it's nice to program in a style that guarantees it instead of hoping for a sufficiently smart compiler. |
|