I think static vs dynamic dispatch trade-off decision is pretty similar to inlining:
- Static dispatch and inlining can have performance benefit.
- Static dispatch and inlining can increase binary size.
So for dispatching, we’re making a trade off between 1 and 2, at the time we write code, but we won’t have a clear trade-off picture until we have a complete code and compile (or even better, runtime? PGO?), just like inlining.
Therefore I think ideally static vs dynamic dispatch decision should be at compile time, with an optional user control flag per function.