~/talk

Lambdas in Java: A Peek Under the Hood

Talkat GOTO Aarhus 2013 · 2013-09-30..10-02· [java]
slides:none on file

Explains how Java SE 8 implements lambdas by emitting a recipe (not inner classes) and using JVM features introduced in Java 7: invokedynamic plus method handles and a runtime lambda metafactory. Compiler desugars lambda bodies to methods, bootstrap links each call site once, and non‑capturing lambdas are cached so hotspots see up to ~70× throughput gains under saturation while capturing lambdas match anonymous‑class cost; serialization records the recipe so deserialization rebuilds lambdas across JVM versions.

AI-written summary · about

  1. 0:00Introduction
  2. 2:24Lambda expressions for Java
  3. 4:02Why lambdas for Java?
  4. 5:44Big question #1: typing
  5. 9:10Functional interfaces
  6. 12:05Big question #2: representation
  7. 16:02New bytecode tool: Method Handle
  8. 19:15Stepping back...
  9. 20:49Bytecode invocation modes
  10. 21:38New bytecode tool:invokedynamic
  11. 30:34Translation strategies
  12. 31:40Indy: the ultimate procrastination aid
  13. 32:40Indy: the ultimate lazy initialization
  14. 34:08Indy: the ultimate indirection aid
  15. 34:59Performance costs
  16. 36:16Performance example - linkage cost
  17. 37:32Performance example - capture cost
  18. 40:47Future VM support (?)
  19. 42:49Serialization
  20. 44:54Summary
~/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.