Sunday, April 2, 2017

Swift Performance Tips for Busy iOS Developers - Presentation

Want to learn quick tips that will improve your apps performance and load time? In this presentation, we’ll explore the latest Swift techniques we can apply to create faster iOS apps. Topics discussed will include:

  • The three dimensions of performance:
    • Allocation (stack vs heap)
    • Reference counting (less vs more)
    • Method dispatch (static vs dynamic)
  • Is Swift faster than Objective-C?
  • Are structs faster than classes?
  • Is inheritance faster than protocol extensions?
  • Grand Central Dispatch patterns
  • Whole module optimization and more

Source Code and Demos

Many of my performance tests are available as Gists. Refer to the slides "Gist" Link in the lower left - Enjoy!


Slide Deck Sneak Peek

Dimensions of performance
Dimensions of performance
Enable Whole Module Optimization
Enable Whole Module Optimization

Avoid for-in
Avoid for-in
Grouping work requests
Grouping work requests

Looking for even more performance tips? The Swift team has an excellent post with even more Swift Performance Tips.