prefetch memory in java
Hi
I am looking for a fanction in java 5 that will prefatch a selected object, does anyone knows such function?
Thanks
The compiler will try to do this for you when it's worth the bother.
But Java is a high-level language, meaning that stuff like this is abstracted away, so you're supposed to just let the compiler/CPU deal with stuff like this. [wink]
The only thing you can do is like Fred304 suggested, to use the object. Then it has to be loaded into CPU cache, and it's effectively "prefetched".
But Java is a high-level language, meaning that stuff like this is abstracted away, so you're supposed to just let the compiler/CPU deal with stuff like this. [wink]
The only thing you can do is like Fred304 suggested, to use the object. Then it has to be loaded into CPU cache, and it's effectively "prefetched".
Java doesn't have functions. Java has only methods.
I asume you don't know the correct term, because prefetch is often used in a meaning tell CPU to async grab something from memory that would be used 15 cycles later.
Assembly commands are outlawed in Java.
I asume you don't know the correct term, because prefetch is often used in a meaning tell CPU to async grab something from memory that would be used 15 cycles later.
Assembly commands are outlawed in Java.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement