r/cpp • • Apr 23 '26

Devirtualization and Static Polymorphism

https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
81 Upvotes

36 comments sorted by

View all comments

Show parent comment

4

u/ts826848 Apr 23 '26

The path is “how do virtual functions work?” -> “vtables”.

Even if you assume that as a baseline the downstream consequences aren't necessarily obvious, especially if you take into account the background needed to understand why some things are faster than others on modern hardware.

Damn, that’s deep.

You might be surprised what different backgrounds cover!