Contents Up << >>

What are relative costs of the 3x performance hits associated with allocating member objects from the freestore?

The three performance hits are enumerated in the previous FAQ:

Thus fully-contained member objects allow significant optimizations that wouldn't be possible under the "member objects-by-ptr" approach. This is the main reason that languages which enforce reference-semantics have "inherent" performance challenges.

NOTE: PLEASE READ THE NEXT THREE FAQs TO GET A BALANCED PERSPECTIVE!