title: Prefetching Examples?
body: <p>Can anyone give an example or a link to an example which uses <code>__builtin_prefetch</code> in GCC (or just the asm instruction prefetcht0 in general) to gain a substantial performance advantage? In particular, I'd like the example to meet the following criteria:</p>
  
  <ol>
  <li>It is a simple, small, self-contained example.</li>
  <li>Removing the <code>__builtin_prefetch</code> instruction results in performance degradation.</li>
  <li>Replacing the <code>__builtin_prefetch</code> instruction with the corresponding memory access results in performance degradation.</li>
  </ol>
  
  <p>That is, I want the shortest example showing <code>__builtin_prefetch</code> performing an optimization that couldn't be managed without it.</p>