4 ms·
Generally speaking the heavy part of both exceptions and rtti are in codegen (ie. the amount of code generated by the compiler), not in the 'runtime'. Exception
by stormbrew 12y ago
Generally speaking the heavy part of both exceptions and rtti are in codegen (ie. the amount of code generated by the compiler), not in the 'runtime'. Exception jump tables and typeinfo objects are calculated as part of the compile and just referred to at run time.
For example, this is the part of libsupc++ (effectively gnu's c++ "runtime") that deals with throwing: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_throw.cc https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-...