Assuming that a system is running the standard JVM (HotSpot) with JIT enabled, is jitted assembly code in any way cached between runs of the same program? I can find no information demonstrating this would be the case, but the contrary seems to be a waste.
            Asked
            
        
        
            Active
            
        
            Viewed 162 times
        
    1 Answers
1
            This has been tried, and I recall that at least some Sun/Oracle releases of Java supported this. However, I also recall that there were / are security and reliability concerns.
(I was recalling this: http://docs.oracle.com/cd/B28359_01/java.111/b31225/chnine.htm#BABDCIBH. And maybe some experimental JVMs as well.)
Besides, one of the benefits of JIT compilation in HotSpot is that the code can be optimized for the particular usage patterns of a particular run of an application. If you cache the JIT compiled code, you lose that potential benefit.
Code caching makes application startup / warmup faster, but in a situation where application instances run for a long time, faster startup is less important than faster steady-state performance.
        Stephen C
        
- 698,415
 - 94
 - 811
 - 1,216