title: How to measure read/cycle or instructions/cycle?
body: <p>I want to thoroughly measure and tune my C/C++ code to perform better with caches on a x86_64 system. I know how to measure time with a counter (QueryPerformanceCounter on my Windows machine) but I'm wondering how would one measure the instructions per cycle or reads/write per cycle with respect to the working set.</p>
  
  <p>How should I proceed to measure these values?</p>