

What programmers need to know about hardware prefetching? - tech_junkie
http://www.futurechips.org/chip-design-for-all/prefetching.html

======
squeed
The article really only touches on the absolute basics. It would have left me
hurting for more specifics. However, I've read Ulrich Drepper's epic paper on
modern memory architectures. (<http://lwn.net/Articles/259710/>)

You should do yourself a favor and read it.

~~~
ChuckMcM
+10, best article on memory ever. If a similar treatment showed up on branch
prediction we would have an excellent pair.

------
rcfox
Is this different from caches? If so, the advice also applies to properly
using the cache. I've read that cache misses are the biggest source of slow-
downs on modern processors. (Sorry, no citation)

~~~
tech_junkie
This is related to caches as the author is talked about hardware prefetching
from memory to caches, i.e., is the act of fetching in to the cache the data
that will be needed in the near future. This reduces cache misses.

------
zwieback
Nice introduction to data prefetching. I don't fully agree with this
statement, though:

 _Second, programmers have very little control over instruction placement in
memory._

Depending on your platform and type of application you may have full control
over instruction placement and it might be extremely important to know how to
sequence instructions to get maximum performance.

~~~
keeperofdakeys
Assuming he is talking about languages like C, and you don't use inline
assembly, I don't see how you can have any control. For anything complex, your
compiler will probably do a much better job then you in creating fast
assembly.In the case you can do better, you would just inline the code, so you
only have control over that small part.

