Kotlin Under the Covers
summary
Kotlin features hide real work: the bytecode and javap and Studio bytecode viewer show boxing, generated helpers and default-parameter bitmasks; the Android memory profiler shows 9,873 Integer allocations for a 10,000-loop nullable-int example; enum switches produce compiler-generated mapping arrays per switch; lazy and delegated properties allocate KProperty arrays and synchronization, inline classes avoid types but sometimes box on equality, unsigneds box for printing, ranges/step create iterator objects, and coroutines compile to an explicit state machine.
AI-written summary · about
chapters (13)
- 0:00Introduction to Kotlin
- 2:30Analyzing bytecode
- 6:12Memory profiling tools
- 10:20Enum performance overhead
- 14:21Lazy property analysis
- 18:45Lateinit properties
- 19:57Unsigned number implementation
- 23:22Loops and range overhead
- 25:50Inline classes
- 29:41SAM conversion gotchas
- 31:23Extension functions
- 33:34Default parameters
- 35:45Coroutines and conclusion








