Speeding Up Codable, or How My Code Got Into Apple
summary
An investigation of Swift’s Codable performance focused on JSONDecoder and JSONEncoder: the talk identifies bottlenecks, proposes optimization ideas, and describes a custom benchmark designed to measure decoder/encoder throughput. It also recounts contributing performance patches to Apple that doubled JSONDecoder/Encoder speed and outlines further techniques that could speed Codable by an additional 3–5× while reducing app size.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:02Codable performance matters
- 3:30Performance impact
- 8:02Slow Codable causes
- 10:28Optimizing type casts
- 15:22Fixing generic constraints
- 20:13Apple’s flawed benchmark
- 21:38Contributing to Swift
- 25:52Large-scale migrations
- 29:01Mangled names deep dive
- 33:38Universal coding keys
- 36:27Final results
- 37:09Q&A
