title: How expensive is RTTI?
body: <p>I understand that there is a resource hit from using RTTI, but how big is it?  Everywhere I've looked just says that "RTTI is expensive," but none of them actually give any benchmarks or quantitative data reguarding memory, processor time, or speed.</p>
  
  <p>So, just how expensive is RTTI?  I might use it on an embedded system where I have only 4MB of RAM, so every bit counts.</p>
  
  <p>Edit: <a href="https://stackoverflow.com/questions/579887/how-expensive-is-rtti/579917#579917">As per S. Lott's answer</a>, it would be better if I include what I'm actually doing.  <a href="https://stackoverflow.com/questions/566846">I am using a class to pass in data of different lengths and that can perform different actions</a>, so it would be difficult to do this using only virtual functions.  It seems that using a few <code>dynamic_cast</code>s could remedy this problem by allowing the different derived classes to be passed through the different levels yet still allow them to act completely differently.</p>
  
  <p>From my understanding, <code>dynamic_cast</code> uses RTTI, so I was wondering how feasable it would be to use on a limited system.  </p>