-Xcomp JVM option considered dangerous?
Does anyone know what the story with this option is?
First, it's listed on the "official" webpage of "unofficial" JVM options
Altho, unlike -Xint, it does not appear (at least for JDK 1.6.0_05) when I execute
Second, is it a bad choice for performance?
I found anecdotal reports of it causing worse performance:
"And using option -Xcomp (which means that all code is compiled before usage) gives even lower performance, which is surprising"
The only way that I can see it causing worse performance is if the initially compiled code is the ONLY compilation that is ever done. In this case, with no profiling information to guide the compilation, suboptimal code should be generated. The 2nd response here
indicates that this is the case.
But in theory, the first use of the code could be a quick compilation which also has profiling code inside and which gets recompiled more optimally in the future.
Anyone know what is really going on inside the HotSpot JVM?