top of page

9-10 APRIL 2026
PARIS


( SPEAKER )
Ariella Mendel
Senior Android Engineer & Adjunct Professor of Android
( session )
Coroutines vs. Threads: The True Cost of a Context Switch
We've all been told that coroutines are "lightweight" and threads are "expensive." But what does this really mean at the OS and hardware level? This talk goes beyond the Kotlin APIs to explore the anatomy of a context switch.
We'll visualize the expensive journey of a blocked thread: the syscall, the kernel trap, the OS scheduler saving registers, and the resulting CPU cache invalidation. Then, we'll contrast it with the elegant, user-space dance of a suspending coroutine, which simply saves its state to a small object on the heap and returns control to its dispatcher.
This session connects high-level code to low-level mechanics. We'll prove this theory in a live demo, using the Android Studio Profiler to watch an app crash under the weight of a few hundred threads, only to then launch 100,000 coroutines with ease. Understanding why this happens will empower you to write, debug, and maintain truly efficient, performant, and scalable Android applications.
bottom of page
