Which lock should you use in Swift? I benchmarked Mutex, locks, queues, atomics, and actors on two real iPhones.
The answer fits in one diagram: Mutex by default, Atomic for a single value. A read-write lock or a queue never beat Mutex.
The numbers on an iPhone 15 Pro Max:
Mutex lock: 1.86 ns
NSLock: 6.36 ns
Actor call from a background task: 52.6 ns
Flag read through queue.sync: 203 ns
Actor call from MainActor: 4.89 µs
The thread switch is the expensive part, not the actor.
I ran eight experiments on two physical iPhones that compare Mutex, OSAllocatedUnfairLock, NSLock, dispatch queues, Atomic, and actors on tasks taken from real apps.
EN: https://t.co/MIKHHFSkJT
RU: https://t.co/bu1tZs32ry
Why my Swift debouncer got 50× faster and what the Swift Runtime has to do with it: A measured investigation of task reuse, Swift runtime metadata, generic specialization, lock placement, and callback latency
https://t.co/mJKaemNISd
I use both Claude Code and Codex, and I got tired of project knowledge staying with whichever agent I had been using. I moved the reviewed parts into the repo so both can work from the same context.
https://t.co/Zi2l6j28IU
Pretty cool, it turns out that Telegram has native support for displaying AI agent progress.
I added it to swift-claw, and now the progress preview looks almost like ChatGPT/Claude.
Wrote a short post about how it works:
https://t.co/qsqYP32j8b
@OpenAI@OpenAI announced dots.
I may have taken “build your own personal AI” too literally 😅
I wrote mine in Swift. One binary on my machine. I send coding tasks via Telegram and get PRs back. Scheduled tasks learn from my feedback.
swift-claw. Open source:
https://t.co/Ka2QAaFmFx
Sad to see Swift Talk come to an end. Thank you, @chriseidhof and @floriankugler, for everything you’ve shared over the years. I learned so much from you both. Wishing you all the best!
https://t.co/xRK7ZW1J8n
@hackernoon Swift 6 concurrency reads differently in a process that stays up for weeks instead of one session. Actor isolation handles data races; state that survives a restart is still your problem. Hit that building my own claw https://t.co/Ka2QAaFmFx
@0x_illuminati Missing auth on cancellations is the gym's bug. The other half is an agent that can fire an irreversible delete with nobody watching. In mine a write or a shell call stops and waits for me to tap Approve in Telegram. https://t.co/Ka2QAaFmFx
I had built a coding agent before, so I knew the agent loop itself is the small part. I wanted an assistant sized for exactly one user, me, on hardware I already own, and to see how far Swift and macOS alone would take it. Six weeks later it runs my mornings.
I wrote a personal AI assistant from scratch in pure Swift: one always-on binary on my own Mac, controlled from a private Telegram chat. No Node, no Python, no Docker.
Open source: https://t.co/Ka2QAaFmFx
That is what the clip shows: the card prints the fully resolved target path, I tap Deny, and clawd writes nothing. Typing "yes" in the chat does nothing at all. Any OpenAI-compatible endpoint plugs in as the model, cloud or local.