INVOKEDYNAMIC = a More Dynamic JVM
summary
invokedynamic introduces a new JVM bytecode plus the method-handle API (JSR-292) allowing a bootstrap method to link a call site once and then execute at near-static-call speed. The talk shows using ASM to emit invokedynamic sites and provides Cookbook examples and microbenchmarks (700 million calls) where invokedynamic matches static calls and far outperforms reflection by avoiding boxing. Practical uses demonstrated include lazy field initialization, on-the-fly proxies for single-method interfaces, combinators (bind/filter/identity), and a memoized Fibonacci implementation that drops runtime from minutes to 51 ms.
AI-written summary · about
chapters (10)
- 0:00INVOKEDYNAMIC intro
- 1:06Why INVOKEDYNAMIC matters
- 10:22Method handles mechanism
- 23:11Bootstrap methods role
- 30:39Method handles examples
- 49:46INVOKEDYNAMIC vs reflection
- 52:45Lazy init with INVOKEDYNAMIC
- 1:01:00Recursion and caching
- 1:14:37Summary and future
- 1:24:12Q&A








