~/talk

Kotlin under the hood: Understand the internals

Talkat Google I/O 2019 · 2019-05-07..05-09· [kotlin]
slides:none on file

Kotlin compiles down to JVM bytecode you can inspect with Android Studio’s Bytecode/Decompile view, and the Memory Profiler reveals real allocations — a loop of 10,001 boxed Ints produces exactly 9,873 Integer allocations because -128..127 are cached. Enums create compiler-generated mapping arrays per when, lazy uses property-delegate/KProperty arrays but avoids reflection via intrinsics, unsigneds are usually free but box for toString, SAM lambdas wrap and can break removeListener, default params use bitmask ints, and coroutines become a label-based state machine.

AI-written summary · about

  1. 0:00Intro
  2. 1:10Kotlin is Awesome
  3. 1:52Goals
  4. 2:17The Tools
  5. 2:43Example: Primitive Types
  6. 3:52Kotlin Bytecode
  7. 6:42Bytecode Decompiler
  8. 7:16Memory Profiler
  9. 12:03Example: when
  10. 19:23Example: Lazy Properties
  11. 21:04Example: Unsigned
  12. 24:18Example: Ranges
  13. 27:38Example: Inline classes
  14. 29:23Example: Arrays Java
  15. 30:37Example: Lambdas
  16. 32:37Example: Extension Functions
  17. 34:23Example: Default Parameters
  18. 37:11Example: Coroutines
~/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.