Adding new intrinsic to HotSpot
Intrinsic is a function whose implementation is handled specially by a compiler. Typically, it means that the function call is replaced by automatically generated instructions. This is very similar to the inline functions, but the compiler knows more about intrinsics as they are part of the compiler itself, so it can use them more wisely.
Intrinsics are usually more performance-oriented than native functions because there is no JNI overhead.
Getting ready
To get started, all we need is an installed NetBeans IDE for code editing and OpenJDK sources. The user should be able to read C++ code and a little knowledge of assembly would be beneficial.
It would be worth checking that SSE4.2 (an extended instruction set with ...
Get OpenJDK Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.