RTTI Overhead in C++

前端 未结 4 2337
感情败类
感情败类 2020-12-15 05:46

What are the memory/performance overheads of enabling RTTI in a C++ program?
Can anyone please throw some light between the internal implementation of RTTI mechanism and

4条回答
  •  忘掉有多难
    2020-12-15 06:06

    First there is no way to say exactly how much overhead is involved with out specifying a compiler and version as it is an implementation detail. That said it is well known that in some compilers dynamic_cast searches the class hierarchy doing string comparisons to match class names.

提交回复
热议问题