title: Measuring exception handling overhead in C++
body: <p>What is the best way to measure exception handling overhead/performance in C++?</p>
  
  <p>Please give standalone code samples.</p>
  
  <p>I'm targeting Microsoft Visual C++ 2008 and gcc.</p>
  
  <p>I need to get results from the following cases:</p>
  
  <ol>
  <li>Overhead when there are no try/catch blocks</li>
  <li>Overhead when there are try/catch blocks but exceptions are not thrown</li>
  <li>Overhead when exceptions are thrown</li>
  </ol>