3 ms·
This is a nice article and props for including and dissecting generated assembler! A key thing here is that inlining is what enables zero-cost abstractions in
by vinkelhake 13y ago
This is a nice article and props for including and dissecting generated assembler!
A key thing here is that inlining is what enables zero-cost abstractions in C++. A virtual call is slower than a regular call, but the main problem is that it builds a barrier that effectively stops inlining.
It'll be interesting to see how devirtualization in GCC will do for real world programs.