Most modern languages make a heavy use of pointers / references: a typical OOP language uses VMT lookups, a typical functional language builds key data structures out of pointers, etc. Even typical C code often sports things like foo->bar->baz
.
It is well-known that dereferencing a pointer is cache-unfriendly, unless the pointer happens to point very near some just-accessed location and hits the same cache line.
Is there, or has there been, hardware that tries to address this problem? It's not currently widely deployed; why?
Hitting L1 or even L2 cache is so much faster than hitting RAM on current hardware that the goal of making pointer dereferencing reap some of the caching benefits seems worthy.
foo->bar->baz
is*(*(foo+barOff)+bazOff)
this is 2 derefs that can be anywhere in memory, there is no real way to predict what needs to be prefetched