 
						Updated for Swift 4
Optimizing Collections
Write custom collections in Swift with a strong focus on performance
by Károly Lőrentey
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.
Book Contents
- 
												Swift CollectionsLearn how Swift's built-in collections perform 
- 
												PerformanceUse benchmarking to measure performance in the real world 
- 
												Copy-On-WriteImplement high-performance value types using copy-on-write 
- 
												Wrapping Built-In DatatypesWrap NSOrderedSetto give it value semantics and copy-on-write performance
- 
												Red-Black TreesBuild red-black search trees using algebraic datatypes 
- 
												B-TreesImplement the data structure behind many file systems and databases 
Formats & Extras
- 
											Code- 
														Mac Playgrounds (full text) 
- 
														Written in Swift 4 
 
- 
														
- 
											Ebook- 
														150-page PDF 
- 
														ePub 
 
- 
														
Buy Book
Bundles
Save on each additional book
About the Author
- 
									  Károly LőrenteyKároly Lőrentey is a freelancer who spends his days and nights on crafting elaborate open-source Swift frameworks instead of working on his apps. 
FAQ
- 
										Is the book updated for Swift 4?Yes! 
- 
										Will you update the book?Yes. For more information on our policy, see book updates. 
- 
										Do you offer student discounts?Yes, please email us and let us know what and where you're studying. 
- 
										Can I get a “reverse charge” invoice without VAT?Just click the "Generate Invoice" link in the receipt email and fill out your company data to get a VAT refund. 
Updates
- 
										November 2017Updated for Swift 4 
- 
										June 2017Initial release (Swift 3) 
- 
										March, 2017Early Access