|
|
|
|
|
by munificent
1149 days ago
|
|
Yes, in principle a compiler is free to generate arbitrarily horrendous code regardless of what you ask it to do. In practice, non-virtual function calls are reliably compiled to fairly efficient code while virtual calls are much less reliable. |
|
Like I said, this echoes the conventional wisdom that most C++ developers seem to retain. The compiler landscape has changed since that wisdom was formed, since the advent of LTO and devirtualization optimizations.