4 ms·
> and even virtual calls are often, and even usually, inlined. Last time I checked it could not inline megamorphic call sites, evn if implementations were tri
by pkolaczk 4y ago
> and even virtual calls are often, and even usually, inlined.
Last time I checked it could not inline megamorphic call sites, evn if implementations were trivial (returning constants).
At the same time I saw C++ compilers able to replace an analogue switch that dispatched to constants with a simple array lookup, with no branching at all.
- pron 4y agoIf I'm not mistaken, C2 inlines up to three targets, but of course, as a JIT, it inlines more aggressively than an AOT compiler, as it does not require a soundness proof.