In this talk, I describe several ways to implement the same simple ordered set protocol in Swift, demonstrating how the language supports a number of surprisingly different approaches to programming. At every step, we trade extra complexity for improved runtime performance, ending on an implementation that is ludicrously fast but also quite difficult to handle.
Presented on dotSwift 2017 in January 2017.
The talk has a repository on GitHub, with full source code and further details: