title: c++, fastest way to check if a file exists?
body: <p>There are multiple ways to check if a file exists.</p>
  
  <p>The options I know of are:</p>
  
  <ol>
  <li><code>boost::filesystem exists()</code></li>
  <li><code>access()</code></li>
  <li><code>stat()</code></li>
  <li><code>ifstream is_open()</code></li>
  </ol>
  
  <p>Does anybody know which of these gives the highest performance? </p>
  
  <p>EDIT: Assume running on /dev/shm where access time is not a factor.</p>