
In this book, we show how to write very efficient Swift collection code. Throughout the book, we benchmark everything—with some surprising results. We implement custom data structures with value semantics and copy-on-write behavior such as sorted arrays, binary trees, red-black trees, and B-trees. Even if you never implement your own collections, this book helps you reason about the performance of Swift code.