This is a pretty basic question but I\'m still unsure:
If I have a class that will be instantiated millions of times -- is it advisable not to derive it from some o
If you need the functionality of FooBase in Foo, either you can derive or use composition. Deriving has the cost of the vtable, and FooBase has the cost of a pointer to a FooBase, the FooBase, and the FooBase's vtable. So they are (roughly) similar and you shouldn't have to worry about the cost of inheritance.