You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Virtual+multiple inheritance certainly works as a design pattern but it has some pretty large overhead both in code and object size. Even empty classes (default destructors, no data) require extra construction vtables. Adding mutable/base interfaces for the action classes increases action class setup/teardown/vtable/typeinfo code size about 30% in the simplest case, most of it in initialization. Eliminating virtual inheritance reduces the code size by another 40% after that.
We need to at least make sure that we only use virtual inheritance with hierarchies as shallow as possible, for as few as possible classes, and only using those at a high level.
The text was updated successfully, but these errors were encountered:
Virtual+multiple inheritance certainly works as a design pattern but it has some pretty large overhead both in code and object size. Even empty classes (default destructors, no data) require extra construction vtables. Adding mutable/base interfaces for the action classes increases action class setup/teardown/vtable/typeinfo code size about 30% in the simplest case, most of it in initialization. Eliminating virtual inheritance reduces the code size by another 40% after that.
We need to at least make sure that we only use virtual inheritance with hierarchies as shallow as possible, for as few as possible classes, and only using those at a high level.
The text was updated successfully, but these errors were encountered: