Swift High Performance

Leverage Swift and enhance your code to take your applications to the next level
Preview in Mapt

Swift High Performance

Kostiantyn Koval

1 customer reviews
Leverage Swift and enhance your code to take your applications to the next level
Mapt Subscription
FREE
$29.99/m after trial
eBook
$19.60
RRP $27.99
Save 29%
Print + eBook
$34.99
RRP $34.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$19.60
$34.99
$29.99p/m after trial
RRP $27.99
RRP $34.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Swift High Performance Book Cover
Swift High Performance
$ 27.99
$ 19.60
Cassandra High Performance Cookbook - Second Edition Book Cover
Cassandra High Performance Cookbook - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $28.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781785282201
Paperback212 pages

Book Description

Swift is one of the most popular and powerful programming languages for building iOS and Mac OS applications, and continues to evolve with new features and capabilities. Swift is considered a replacement to Objective-C and has performance advantages over Objective-C and Python. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun.

Develop Swift and discover best practices that allow you to build solid applications and optimize their performance.

First, a few of performance characteristics of Swift will be explained. You will implement new tools available in Swift, including Playgrounds and REPL. These will improve your code efficiency, enable you to analyse Swift code, and enhance performance. Next, the importance of building solid applications using multithreading concurrency and multi-core device architecture is covered, before moving on to best practices and techniques that you should utilize when building high performance applications, such as concurrency and lazy-loading. Finally, you will explore the underlying structure of Swift further, and learn how to disassemble and compile Swift code.

Table of Contents

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
Summary
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
Summary
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
Summary
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
Summary
Chapter 6: Architecting Applications for High Performance
Achieving high performance
Concurrency overview
Designing asynchronous code
Avoiding state
Divide and conquer
Controlling the lifetime
Summary
Chapter 7: The Importance of Being Lazy
The lazy mindset
Lazy loading
Lazy collections and evaluation
Summary
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
Summary
Final thoughts

What You Will Learn

  • Build solid, stable, and reliable applications using Swift
  • Use REPL and Pl to manage and configure relational databases
  • Explore Swift's features including its static type system, value objects, and functional programming
  • Design reusable code for high performance in Swift
  • Use to Xcode LLBD and REPL to debug commands
  • Avoid sharing resources by using concurrency and parallel programming
  • Understand the lazy loading pattern, lazy sequences, and lazy evolution.

Authors

Table of Contents

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
Summary
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
Summary
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
Summary
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
Summary
Chapter 6: Architecting Applications for High Performance
Achieving high performance
Concurrency overview
Designing asynchronous code
Avoiding state
Divide and conquer
Controlling the lifetime
Summary
Chapter 7: The Importance of Being Lazy
The lazy mindset
Lazy loading
Lazy collections and evaluation
Summary
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
Summary
Final thoughts

Book Details

ISBN 139781785282201
Paperback212 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Swift 2 Book Cover
Mastering Swift 2
$ 39.99
$ 28.00
Swift Essentials Book Cover
Swift Essentials
$ 29.99
$ 21.00
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Mastering Swift 3 Book Cover
Mastering Swift 3
$ 35.99
$ 25.20
Python Machine Learning Book Cover
Python Machine Learning
$ 35.99
$ 25.20
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00