Hardware Graph Prefetchers
www-dyn.cl.cam.ac.uk
www-dyn.cl.cam.ac.uk
I haven't fully internalized OP's approach yet (and this was many years ago, so I'm no longer very knowledgeable), but they seem to be making more assumptions about what the data structure looks like, where I had a compiler distilling arbitrary pointer traversals out of large programs.
a) It requires the graph to only be accessed in one way. For example anything data-driven like binary tree search is out.
b) At least in languages without copying collectors (my focus was C programs) it requires the graph to be immutable or mostly immutable.
https://blog.acolyer.org/2016/05/25/socialhash-an-assignment...
Now, if only we(or the compiler) has a way of hinting to the cpu how to prefetch the objects, it would give us awesome performance.
Plus, they're not portable, even if you get the timing right now, it won't work on the next generation of the microprocessor or on a slightly different memory subsystem. You might be able to tune it just right on your desktop, but it probably won't work as well on your laptop, and it certainly won't work as well on a cluster.
IMO prefetch instructions are a useful hack when you have a very specific machine on which you're hand-tuning assembly to get the most performance. There aren't too many scenarios where this is useful - maybe scientific workloads on huge supercomputers are one - but they're otherwise kinda useless.
I think using Java or any other JIT system will solve this problem.