Item 15:Understand the costs of exception handling.(More Effective C++)
The prudent course of action is to be aware of the costs described in this item, but not to take the numbers very seriously. Whatever the cost of exception handling, you don't want to pay any more than you have to. To minimize your exception-related costs, compile without support for exceptions when that is feasible; limit your use of
try
blocks and exception specifications to those locations where you honestly need them; and throw exceptions only under conditions that are truly exceptional.