~/talk

Groovy - The Art of Calling Methods

Talkat JVM Language Summit 2012 · 2012-07-30..08-01· [java]
links:none on file
slides:none on file

Three dispatch strategies and measurable tradeoffs: the simple central invoker uses ScriptBytecodeAdapter.invokeMethodN, is easy to implement but causes megamorphic call sites, heavy boxing and very slow performance. Adding call site caching cuts a Fibonacci microbenchmark from ~600 ms to ~100 ms (~6x) by replacing reflection. Primitive optimizations compile guarded fast- and slow-paths, hitting ~50% of Java speed (goal was 10x improvement over Groovy 1) at the cost of larger bytecode. Using invokedynamic reduces boxing (9→5 boxes in the example) and yields shorter bytecode and better JIT opportunities, but still needs guards for categories, metaclass changes and constructor calls.

AI-written summary · about

  1. 0:00Introduction
  2. 0:57Groovy Code
  3. 2:27Central Invoker
  4. 4:52Pros Cons
  5. 14:06Primitive Optimization
  6. 15:39Basic Optimization
  7. 17:20JIT
  8. 20:38Negatives
  9. 23:05Meter classes
  10. 27:38Invoke Dynamic
  11. 28:29Invoke Dynamic Limitations
  12. 32:12InvokeDynamic
  13. 33:31Guard
  14. 36:58Special class conversions
  15. 38:08Fibonacci example
  16. 38:54Advantages of invoke dynamic
  17. 40:56Problems with invoke dynamic
  18. 43:12Performance comparison
  19. 44:53Wish list
~/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.