Kotlin Under the Hood
summary
Shows concrete tools — bytecode and decompiled Java, Memory Profiler — and exact compiler behavior: enum when compiles to a generated switch mapping array allocated and init at class load; lazy delegates allocate a KProperty array and a Lazy object with synchronized getValue; unsigned and inline classes compile to primitives but can box for toString or equals; different for‑loop/range syntaxes produce different allocations; default parameters use integer bitmask flags; coroutines compile to a state‑machine class with a label field.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:59Kotlin is Awesome
- 2:36Kotlin is Magical
- 3:48The Tools
- 4:41Example: Primitive Types
- 5:56Kotlin Bytecode
- 8:16Bytecode Decompiler
- 8:48Memory Profiler
- 10:46Interlude When 10001 - 10001
- 12:09Example: when
- 15:32Example: Lazy Properties
- 20:19Example: Unsigned
- 23:33Example: Ranges
- 26:09Example: Inline classes
- 29:43Example: Arrays
- 30:32Example: Extension Functions
- 32:57Example: Default Parameters
- 35:27Example: Coroutines
- 39:25Should You Care?








