Random and consecutively access and L2/L3 cache hit ratio

Random and consecutively access and L2/L3 cache hit ratio

Dear experts,I am trying to understand the following phenomena. I have plain array of integers (500000 x 4B) which I access randomly (index generated by system rand call) (case 1) and consecutively (case 2). I wanted to see the L2/L3 cache access counters in this two cases. My naive expectations were that the array of that size (2MB) would fit in the L3 cache (3MB) and both cases would give comparable cache-misses counts. In fact I have expected that the counter getL3CacheHitRatio would be around 1.Surprisingly it is close to 0.8 for the random access and close to 0.3 for iterative access. I want to repeat this for bigger (200MB) array but before that step I need to know how to interpret this counters.