title: Prefetching data to cache for x86-64
body: <p>In my application, at one point I need to perform calculations on a large contiguous block of memory data (100s of MBs). What I was thinking was to keep prefetching the part of the block my program will touch in future, so that when I perform calculations on that portion, the data is already in the cache. </p>
  
  <p>Can someone give me a simple example of how to achieve this with gcc? I read <code>_mm_prefetch</code> somewhere, but don't know how to properly use it. Also note that I have a multicore system, but each core will be working on a different region of memory in parallel.</p>