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?
Name:
Anonymous2014-01-09 17:39
>>2
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
I ARE ANDRU
Name:
Anonymous2014-01-12 2:32
*YOU HAVE BEEN VISITED BY LE TOP LEL OF COMEDY GOLD** POST THIS IN 3 threads or lose your sides!
░░░░░░░▄▀▀▀░▄▄▄▄░░░▀▀▀▀▀▀▀▀▄▄░▀
░░░░░░░█░░░░░░░░▀▀▀▀▀▄▄▄▄▄▄▄▄▀░░█
░░░░░▄▀░░░░░░░░░░▄░░░░░░░░▄▄░░░░░▀▄
░░░▄▀░░░░░▄▀▀▀█▄░▀░░░░▄▀▀▀██▀▀▄░░░░░▀
░░▄▀░░▄▄░░▀▀▀▀████▀░░░▀▄▄▀▀▀▀▄█░░░░░░█
░▄▀░▄▀█░░▄▄░░░░░░░█░░░░░▄▄▄░░░▀▀░░░░░░█
▄▀░░█░█░▀░░▀▀▄░░░░░█░░░░░░░▀▀▀▀▀▄░░░░░█
▀▄░░▀░█░░░▄░░░░░░▄▀░░░░▀▄░░░▄▄░░▀▄░█░▄▀
░░▀▄░░░░█▀▄░░░░░▀█░░░░▀▀░█▄▀▄░█░░░█░█
░░░░█░░█░▀▄▀▄▄░░░░▀▀▀░░░▄█▀░▄▀█░░░░▄
░░░░░█░░█░▀▀▄░▀▄▄▄▄▄▄▄▀█░▄█▀▄▀░░░░░
░░░░░█░░▀▄▄░░▀█░░░█░░▄▄▀▀▄▄█▀░░░░▀
░░░░▄▀░░░▀▄▀▀▄░▀▀▀▀▀▀▄▄▀▀▀▄▀░░░░▀
░░░▄▀░░░░░░▀▄░█▄▄▄▄▀▀░▀▄▀▀░░░▄▀▀
░░▄▀░░░░░░░░░▀▄▄▄▄█▄▄▀▀░░░░▄
░░█░░░░░░▀▄▄░░░▄▄▄▄▄▄▀░░░▄▀
░░█░░░░░░░░░▀▀▀▄▄▄▄▄▄▄▀▀
░░░█░░░░░░▀▀▀▀▀░░░░▄
░░░▀▀▄▄▄▄▄▄▄▄▄▀▀▀
>─────▄████▀█▄
>───▄█████████████████▄
>─▄█████.▼.▼.▼.▼.▼.▼▼▼▼
>▄███████▄.▲.▲▲▲▲▲▲▲▲
>███████████████████▀▀
YOU HAVE BEEN CAUGHT BY THE GATOR OF DOOM! REPOST THIS 5 TIMES OR GET GATORED!!!