HotSpot Optimization

compiler tactics:

proof-based techniques:

flow-sensitive rewrites:

language-specific techniques:

  • class hierarchy analysis
  • devirtualization
  • symbolic constant propagation
  • autobox elimination
  • escape analysis
  • scalar replacement
  • lock elision
  • lock fusion
  • de-reflection

speculative (profile-based) techniques:

  • optimistic nullness assertions
  • optimistic type assertions
  • optimistic type strengthening
  • optimistic array length strengthening
  • untaken branch pruning
  • optimistic N-morphic inlining
  • branch frequency prediction
  • call frequency prediction

memory and placement transformation:

  • expression hoisting
  • expression sinking
  • redundant store elimination
  • adjacent store fusion
  • card-mark elimination
  • merge-point splitting

loop transformations:

global code shaping:

  • inlining (graph integration)
  • global code motion
  • heat-based code layout
  • switch balancing
  • throw inlining

control flow graph transformation:

[h3]Addional resources[h3]Oracle’s guidance page
List on the HotSpot wiki: here

Made this look good.

Was pretty much work…

Thought about writing a Generator.
But didn’t do it…