2 ms·
The "if you want to get into it..." - Escape Analysis in the HotSpot JIT Compiler - https://blogs.oracle.com/javamagazine/post/escape-analysis-in-the-hotspot-ji
by shagie 4y ago
The "if you want to get into it..." - Escape Analysis in the HotSpot JIT Compiler - https://blogs.oracle.com/javamagazine/post/escape-analysis-in-the-hotspot-jit-compiler https://blogs.oracle.com/javamagazine/post/escape-analysis-i...
If you can prove that that a particular value never escapes the scope, it may be possible to allocate it on the stack instead which also reduces the amount of garbage collection needed later.
And other related reading:
https://web.archive.org/web/20120214195433/http://www.ibm.com/developerworks/java/library/j-jtp09275/index.html https://web.archive.org/web/20120214195433/http://www.ibm.co...
https://www.javaadvent.com/2020/12/seeing-escape-analysis-working.html https://www.javaadvent.com/2020/12/seeing-escape-analysis-wo...