Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Swift High Performance

You're reading from   Swift High Performance Leverage Swift and enhance your code to take your applications to the next level

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781785282201
Length 212 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 Koval Koval
Author Profile Icon Koval
Koval
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Swift High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Exploring Swift's Power and Performance 2. Making a Good Application Architecture in Swift FREE CHAPTER 3. Testing and Identifying Slow Code with the Swift Toolkit 4. Improving Code Performance 5. Choosing the Correct Data Structure 6. Architecting Applications for High Performance 7. The Importance of Being Lazy 8. Discovering All the Underlying Swift Power Index

Summary


In this chapter, we have covered many topics related to Swift performance. First we need to understand what we need to improve and enable optimization settings to get the best performance.

Memory usage is very important for achieving high performance. First, we covered how using constants can have a positive impact on performance. The second and more important example reflects how using value types and structures reduces memory usage and also improves performance by using fast stack memory.

The third important topic we have covered is dispatching methods. We have analyzed and compared both Objective-C dynamic dispatch and Swift static dispatch. By looking at the assembly code we have seen how Swift actually performs method dispatch and how it can benefit performance.

We have also covered some dangerous operations that could decrease performance and that should be avoided.

In the next chapter, we will learn more about different data structures: their differences and performance characteristics...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images