How much instruction-level optimisation can a JIT apply?
问题 To what extent can a JIT replace platform independent code with processor-specific machine instructions? For example, the x86 instruction set includes the BSWAP instruction to reverse a 32-bit integer's byte order. In Java the Integer.reverseBytes() method is implemented using multiple bitwise masks and shifts, even though in x86 native code it could be implemented in a single instruction using BSWAP . Are JITs (or static compilers for that matter) able to make the change automatically or is