~/talk

Java vs CPU

TalkinPolishat Confitura 2023 · on Saturday, 2023-06-24· [java, linux-and-operating-systems]
links:none on file
slides:none on file

Three Java experiments show how low-level CPU details affect performance: reordering three nested loops to improve memory locality and cache-line use drops runtime from 8s to 0.5s (perf shows 0.56 vs 1.79 instructions/cycle). Multithreaded counters suffer false sharing—changing from one atomic counter to per-thread ints moves runtime from 600ms to 500ms with only modest scaling. JIT can auto-vectorize, but inspecting assembly and using perf/toplev/VTune reveals that using the SIMD Vector API or tuning data layout gives the largest throughput gains (GB/s-level improvements).

AI-written summary · about

  1. 0:00Introduction
  2. 2:34Complexity vs performance
  3. 5:03CPU memory interaction
  4. 9:59Parallelism in multithreading
  5. 15:38True vs false cache sharing
  6. 18:06JVM performance
  7. 20:52LinkedList vs ArrayList
  8. 25:03Vector instructions impact
  9. 30:17Summary
  10. 33:24Q&A
~/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.