In C, I can allocate case for a variable, for example:
register int i = 0;
I know that Java is an interpreted language and has many abstractions from the processor.
Is there any mechanism available even for a request (and if the architecture does not allow it, and so on) that my variable remains in the register instead of going to the cache or main memory?
I donβt think there is any way, but I was pleasantly surprised before.
Thanks,
java c cpu-registers
eleven81
source share