更新时间:2021-08-05 16:36:37
封面
版权页
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Exploring Swift's Power and Performance
Swift speed
Welcome to Swift
Swift's features and benefits
Swift interoperability
Performance – meaning and key metrics
Summary
Chapter 2. Making a Good Application Architecture in Swift
Making a Swift application
The differences between variables and constants
Immutability
Value types and immutability
Representing the absence of values with optionals
Functional programming
Generics
Safety
Chapter 3. Testing and Identifying Slow Code with the Swift Toolkit
REPL
Playgrounds
LLDB
REPL in Xcode
Console logs
Performance measuring in unit tests
Instruments
A reminder
Chapter 4. Improving Code Performance
Understanding performance optimization
Optimization checklist
Swift code compilation
Constants and variables
Method calls
Intelligent code
Improving speed
Value objects and reference objects
Swift arrays and unsafe C arrays
Avoiding Objective-C
Chapter 5. Choosing the Correct Data Structure
An overview of data structures
Collection types
Swift standard library collections
Collection memory allocation
The CollectionType protocol methods
Accelerate and Surge
Other collections
Chapter 6. Architecting Applications for High Performance
Achieving high performance
Concurrency overview
Designing asynchronous code
Avoiding state
Divide and conquer
Controlling the lifetime
Chapter 7. The Importance of Being Lazy
The lazy mindset
Lazy loading
Lazy collections and evaluation
Chapter 8. Discovering All the Underlying Swift Power
How Swift is so fast
Swift command line tools
The Swift compiler
The Swift compilation process and swiftc
Analyzing executable files
Final thoughts
Index