title: Cache line size
body: <p>It might be a very common and simple question but I need some explanation about the curve that I just obtained from a cache benchmarks code. The goal here is to find the cache line size. I used the code from here:
  (h**ps://github.com/jiewmeng/cs3210-assign1/blob/master/cache-l1-line.cpp)</p>
  
  <p>This is the curve that I have obtained from running the code on my machine (Macbook Pro with core i7 - cache line size is 64byte - L1 data cache is 32KB).</p>
  
  <p><a href="https://dl.dropboxusercontent.com/u/53860330/Screen%20Shot%202013-10-26%20at%206.28.25%20PM.png" rel="nofollow">The Time vs different stride size curve</a></p>
  
  <ul>
  <li>I think the peak happens on 128 bytes and not on the 64 bytes. if it is true I want to know why?</li>
  <li>Why the time is reduced at 512 bytes?</li>
  </ul>
  
  <p><strong>Update:</strong></p>
  
  <p>I also ran a code to determine the size of the L1 and L2 caches. Here is the figure just to document the data. As you can see there is two peak in 32KB (L1 Cache size) and 256KB (L2 Cache size). </p>
  
  <p><strong>Question:</strong></p>
  
  <p>I am wondering if there is any way to find the size of L3 shared cache.</p>
  
  <p><a href="https://dl.dropboxusercontent.com/u/53860330/cachesize.png" rel="nofollow">Cache size figure</a>.</p>
  
  <p>Thanks</p>