~/talk

FROM SCALA TO ASSEMBLY THE COST OF ABSTACTION REVISITED

Talkat Scalar 2020 · on Friday, 2020-05-15· [compilers-and-language-design]
slides:none on file

Claims that high-level Scala constructs are always slow get tested with real numbers: code examples compile to bytecode and assembly and are profiled with JMH, JITWatch, Java Flight Recorder / JMC, jstack and jstat. Surprise: immutable “copy” patterns often vanish under Graal JIT and become a tiny loop with almost no allocations, while monad transformers add measurable overhead compared to stacked Option/Task or plain null returns. Cache behavior also dominates: columnwise array access shows ~70% cache misses. Measure on your JVM before changing design.

AI-written summary · about

  1. 0:00Intro
  2. 1:07Motivation
  3. 2:33Is it always true
  4. 5:39Premature realization
  5. 7:14We like numbers
  6. 7:58Scala is immune
  7. 8:31High performance
  8. 9:08Performance in Scala
  9. 12:43Immutable classes
  10. 13:37JavaP
  11. 14:23bytecode
  12. 14:49justintime compilation
  13. 17:18JVM inlining
  14. 20:12JMH
  15. 21:26Dead code elimination
  16. 22:19Special way to call it
  17. 22:31Measuring immutability
  18. 23:10Comparing the results
  19. 25:21Java Flight Recorder Java Mission Control
  20. 27:20Java Flight Recorder Test
  21. 30:00Jstack
  22. 31:46Safe Point Bias
  23. 33:04Preassembly
  24. 34:14JITWatch
  25. 35:15ReadingAssembly
  26. 36:27Garbage Collector
  27. 41:13Null
  28. 44:19For loop
  29. 45:30While
  30. 46:35Performance counters
  31. 48:14Garbage collectors
  32. 52:37Outro
~/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.