effective c++
[MECpp]Item-26 Limiting the Number of Objects of a Class
· β 7 min read
Combining object-counting technique with the pseudo-constructors, we can limit the number of objects of a class.
[MECpp]Item-25 Virtualizing Constructors and Non-Member Functions
· β 5 min read
Depending on the different input or dynamic types of function parameters, “virtualization” is a useful technique to construct new objects of different types accordingly, or to conceive of non-member functions whose behavior changes accordingly.
[MECpp]Item-24 Understand the Costs of Virtual Functions, Multiple Inheritance, Virtual Base Classes, and RTTI
· β 6 min read
It’s important to have a basic understanding of the cost of some C++ features that can have a noticeable impact on the size of objects and the speed at which member functions execute.
[MECpp]Item-23 Consider Alternative Libraries
· β 2 min read
Different libraries offering similar functionality often feature different performance trade-offs, so we might be able to remove bottlenecks by replacing one library with another.