|
|
|
|
|
by CyberRabbi
1148 days ago
|
|
> 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. Neither implementation guarantees any particular sequence of assembly instructions. Both require hoping that a sufficiently smart compiler will compile it to a sufficiently optimal sequence of instructions. |
|
In practice, non-virtual function calls are reliably compiled to fairly efficient code while virtual calls are much less reliable.