4 ms·
Speculative or unconditional devirtualization are reasonable things to do if you are the compiler. Writing code by hand, it's quite unwieldy, since the compile
by o11c 3y ago
Speculative or unconditional devirtualization are reasonable things to do if you are the compiler.
Writing code by hand, it's quite unwieldy, since the compiler doesn't know that a `FinalFooFrobber` always contains has its vtable set to `FrobberVtable foo_vtable`, which often appears only after inlining.
Asking C programmers to do inlining by hand is not sane. This isn't like interpreted languages where inlining sucks - here, the compiler is quite capable of it, just the vtable stuff confuses it.