Complete Loop Elimination
An Idea....is it possible?
suppose I can programmatically compile java code, and store in memory ..*not disk*?
when a method contains a loop, during first execution, copy contents of loop into string
then compile programmatically the string into memory.
when that same method is called the second time, it is replaced by the newly compiled method, which
-has no loop.
-may have no need for array element, in which would reuse objects.
-if it was an array we were performing on, check array size, before attempting to use the memory copy.
would this be known as caching?
how about, loop memoization. ....is this already fully done by the JIT - eg loop unrolling?