Closing the performance gap between Swift and C
Автор: Swift Meetups
Загружено: 2026-02-01
Просмотров: 301
Описание:
Password hashing in Vapor has relied on C code for years because pure Swift implementations of Bcrypt were unusably slow in debug builds—taking tens of seconds where C took milliseconds. This forces a critical part of our ecosystem to depend on foreign code.
While bcrypt is a simple algorithm, it comes with a computationally heavy setup that tanks debug performance when using unoptimised code. The latest versions of Swift offer new tools to address this, but can they actually close the gap?
This talk chronicles my attempt to rewrite bcrypt in pure Swift and match C's debug performance. I'll share what I learned exploring different approaches: from unsafe pointers to Swift 6's new Span type. There will be real benchmarks showing what worked, what didn't and why, and we'll examine the tradeoffs between performance, safety, and ergonomics of each approach.
Speaker Bio
I'm Paul, a server-side Swift developer at Broken Hands where I do consultancy for various clients around the world and contribute to Vapor and its ecosystem. I'm a maintainer for some of Vapor's packages and am particularly passionate about cryptography and networking. Outside of programming, I love travel and good food.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: