~/talk

What Lies Beneath

Talkat Devoxx Belgium 2019 · 2019-11-04..11-08· [compilers-and-language-design]
links:none on file
slides:none on file

Walks a tiny Java program from source through bytecode to x86 machine code and CPU caches, showing concrete effects: use javap -v to inspect the constant pool and bytecodes, use -XX:PrintInterpreter to see the template interpreter’s IDIV special-case checks (divide-by-zero and INT_MIN / -1), and use JMH to avoid dead-code elimination—a broken hand benchmark reports 0.25 ns/op (faster than a 0.3 ns clock) because JIT inlines, constant-folds and deletes work, while a linked-list vs primitive-array test exposes huge cache-miss penalties and prefetch behavior.

AI-written summary · about

  1. 0:00Intro
  2. 1:25Dmitry Vyazelenko
  3. 2:37What Lies Beneath
  4. 10:17Executing
  5. 13:45java ... -XX: +PrintInterpreter
  6. 17:21Improving Our Program...?
  7. 18:24How Not to Benchmark
  8. 20:42Let's Benchmark!
  9. 22:03Manual Optimisation
  10. 24:05Without Inlining (-XX:-Inline)
  11. 26:02With Inlining
  12. 28:30JIT Optimisations
  13. 30:57But Processors Got Better...
  14. 32:30Bridging the Gap
  15. 34:08The Memory Hierarchy
  16. 36:37Measuring Cache-Friendliness
  17. 42:40Primitive Array
  18. 43:40Poor Unloved Linkedlist...
  19. 45:27Conclusions From javac soup to hardware nuts, there's a lot of advanced technology here. And as everyone knows to the ignorant
  20. 46:20Digging Deeper...
~/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.