~/talk

Java performance techniques The cost of HotSpot runtime optimizations

Talkat Voxxed Days Vienna 2017 · 2017-03-16..03-17· [java]
slides:none on file

HotSpot C2 (threshold ~10k) often makes aggressive assumptions that can yield 100x faster runs versus the interpreter but a single unexpected branch triggers an uncommon trap and bails to the interpreter, costing roughly 100x for that call. Null checks often rely on hardware signals (segfault handler) and are expensive when they first occur. Loop unrolling up to 8x and inlining (default max depth 9, avoid >325-byte hot methods) improve throughput; string dedup reduces heap but increases Stop-The-World pauses and biased locking can cause ~1ms pauses. Tools: JITWatch, JMH, HPjmeter.

AI-written summary · about

  1. 0:00Start
  2. 0:25About Me
  3. 0:48Agenda
  4. 2:01My Configuration
  5. 2:50Just In Time Compiler - HotSpot
  6. 8:29Uncommon Traps
  7. 19:38Null Sanity Checks
  8. 29:22Loop Unrolling
  9. 35:35String Deduplication
  10. 39:52Biased Locking
  11. 43:26Inlining
  12. 50:04Huge Methods
  13. 51:45Too Many Arguments
  14. 52:51In Closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.