Java FAQ: Top Questions
69. What are JVM intrinsics?
JVM intrinsics are special methods in the JVM that the JIT compiler replaces with highly optimized, platform-specific machine code, bypassing standard Java bytecode execution.
-
Examples:
System.arraycopy,Math.sin,String.equals. - Mechanism: HotSpot defines intrinsics in its codebase, triggered during JIT compilation.
- Benefits: Significant performance boost for common operations.
-
Control:
Can be disabled with
-XX:-Use(e.g.,-XX:-UseMathFusedMultiplyAdd). - Use Case: Critical for high-performance libraries and applications.
