Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I ARE ANDRU

Name: Anonymous 2014-01-09 17:09

FUCK DEAVMI! I ARE ANDRU

Name: Anonymous 2014-01-09 17:12

Can someone teach me a little about CPU prefetching as a c++ programmer? I understand the gist of it but I have some more detailed questions:

Lets say I declare an array, arr, like so:
float arr[1000];

Now, if I loop from the beginning of the array to the end, as I understand, cache coherance is maximum, and  prefetching is utilized.
for(int i =0;i<1000;++i)
      arr[i] += 1;
...but if I run the array backwards, will it prefetch automatically in the backwards direction as well?

Basically my question is: do processors prefetch data Around an adress, or does it only grab subsequent data tthrogh prefetching?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List