5 ms·
The Hotspot JIT reads the CPU configuration at runtime to choose which optimizations are best or which instruction extensions are available.
by rjsw 7y ago
The Hotspot JIT reads the CPU configuration at runtime to choose which optimizations are best or which instruction extensions are available.
- chrisseaton 7y agoThat doesn't help the performance of the runtime code, which is C++ or AOT-compiled Java.
- pron 7y agoRight, but the OpenJDK VM (HotSpot) uses three JITs -- C1, C2 and Graal -- and two of them are written in C++, so C++ compiler flags could affect the performance of the JIT compilers, although not of the code they generate. Because the performance of the emitted code is far more important than the performance of the compiler, I doubt that will make a difference, but there are other important parts of the OpenJDK VM that are written in C++ and whose performance might be affected, most notably the GCs.
- msbarnett 7y agoThat's great for the Java code being JITed, but does nothing for the JIT compiler itself, or the garbage collectors, or any other runtime components that are written in C or C++ and compiled (and optimized) ahead of time.
- simpsond 7y agoYeah, I suspect a good chunk of the performance improvement is related to GC performance improvement. The netty benchmark with pooled buffers compared to unpooled buffers hints at that (although I don't know for sure).