Hi,
On Sunday 24 May 2009, Raphael Clifford wrote:
> I am mystified by the D1 cache miss lines. I get
>
> D refs: 144,057,551 (94,023,790 rd + 50,033,761 wr)
> D1 misses: 2,119,185 ( 1,993,960 rd + 125,225 wr)
Why mystified?
If you look at your code, with length=2000000
> for (i=0;i<length;i++) {
> val = rand() % length;
> temp += p[val];
> p[val] = i;
> }
There are 2000000 loop bodies, and the first random access into p[] is
a read access in line
temp += p[val];
It is expected that almost any access here gives a L1 read miss, and
actually, you see around 2 million D1 read misses.
As the memory block containing p[val] is in the cache afterwards, there
will be no further misses (esp. no write misses).
Josef
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users