Sitemap
The Swift Cooperative

Authors publishing advanced articles on Swift and SwiftUI application development.

COW2LLVM: The isKnownUniquelyReferenced Deep-Dive

Demystify the Swift Compiler, the engine behind copy-on-write

16 min readSep 29, 2023

--

Press enter or click to view image in full size
Photo by Wolfgang Hasselmann on Unsplash

I mostly post to Substack these days. Subscribe now to receive non-paywalled, ludicrously in-depth articles on iOS, Swift, and indie projects every 2 weeks.

The copy-on-write (a.k.a. CoW or 🐮) optimisation is the quintessential under-the-hood interview question for iOS engineers.

Today, we’re going on a quest to discover how this optimisation really works. I’m taking you on a journey deep into the enigmatic source code of the Swift compiler.

And, of course, I’m going to be referring to copy-on-write as 🐮 throughout.

Roadmap

What is 🐮?

--

--

The Swift Cooperative
The Swift Cooperative

Published in The Swift Cooperative

Authors publishing advanced articles on Swift and SwiftUI application development.

Jacob Bartlett
Jacob Bartlett

Written by Jacob Bartlett

I'm an iOS Engineer in London startups. Every 2 weeks, I'll send you ludicrously in-depth articles about iOS, Swift, tech, and indie projects.

Responses (3)