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.
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.