filmov
tv
Java Performance Techniques. The Cost of Runtime Optimizations - Ionut Balosin

Показать описание
The talk reveals how HotSpot internally handles some performance optimizations (e.g. static, speculative and inter-procedural) which sometimes can bring Java code to run faster than similar C/C++ code. It will also cover the penalty of code deoptimizations (e.g. uncommon traps), which brings back the running thread into the Interpreter. The take away for the audience would be a better understanding about why these optimizations matter, as well as things which might optimize the code but in reality backfire.
Core topics of the agenda:
- Uncommon traps
- Null Sanity Checks
- Loop unrolling
- String deduplication
- Devirtualization
- Inter-procedural optimizations (e.g. inlining)
- Brench predictions
- Concurrency implications (e.g. memory access optimization, biased locking and the cost of Stop-The-World pause) - Methods that do not JIT
The tools used to prepare the talk and reveal these optimizations are: JITWatch, JMH (Java Measurement Harness) and HPjmeter.