RTTI

Today's dynamic exceptions require RTTI to match the exception handlers and RTTI is the second C++ feature violating the zero-overhead principle. It does it in two ways:

  • First, it requires support for typeid::name(), which in turn requires storage of metadata, increasing memory usage. This is the only place in C++ where metadata is used!
  • Second, the performance of RTTI lookup is unpredictable, because linking in an unknown, third-party, shared library can increase the time needed to resolve it dramatically!

Because of that, RTTI was also banned in many project's coding guidelines (for example, Firefox), hence effectively prohibiting the use of exceptions in one sweep.