Boosting Codable Performance in iOS 26.3
Christian Benua
10:20-10:55, Tuesday, 19th May 2026
Codable is everywhere in iOS apps—networking, persistence, analytics—so even “small” inefficiencies in JSONDecoder/JSONEncoder can quietly turn into real CPU, battery, and latency costs at scale. In this talk, I’ll walk through a performance issue I found in Swift Foundation and the pull request that made JSON decoding/encoding roughly 2× faster in a real-world scenario.
We’ll start with how the bottleneck was detected and how to reason about performance problems in code you don’t own (standard library: Foundation). Then we’ll do a guided deep dive into the internals of JSONDecoder/JSONEncoder and the Codable machinery to see where the time is actually going and why.
A key part of the story is measurement: we’ll cover practical techniques to validate optimizations without relying on Time Profiler, including runtime swapping/hooking to A/B test two implementations inside the same app process. Finally, we’ll discuss how to benchmark Codable correctly, why some existing benchmarks didn’t catch this issue, and what it’s like to contribute performance fixes to Swift Foundation.
Takeaways: a repeatable workflow for finding bottlenecks, building trustworthy micro-benchmarks, and upstreaming improvements to open source.
Christian Benua
iOS Performance Engineer