Download Ios Macos Performance Tuning - Programming Ebook

Latest

Download Programming Ebook

Thursday, February 6, 2020

Download Ios Macos Performance Tuning

Ios Macos Performance Tuning
Ios Macos Performance Tuning



Book Details 
             TitleIos Macos Performance Tuning
         AuthorMarcel Weiher 
    Language: English
        SubjectSwift / Computers & Technology / Programming / Apple Programming
No. of pages: 403
         Format: PDF, EPUB

Introduction

Performance is one of the most important qualities of software programs. You can’t have world-beating software without world-beating performance. For a long time, hardware improvements meant that worrying about software performance seemed a waste of time, but with Moore’s Law no longer automatically providing significant automatic performance improvements, performance optimization is coming back to the forefront of both computer science and engineering.

In addition, performance for end users seems to have gotten only marginally better, whereas the performance of the underlying hardware has improved by many orders of magnitude. Bill Gates quipped that “the speed of software halves every 18 months,” whereas Wirth’s law in A Plea for Lean Software states, “Software is getting slower more rapidly than hardware becomes faster.”1

We are so used to this sorry state of affairs that industry veterans were surprised at the original iPad’s fluid UI, despite having a CPU with “only” 1 GHz. That’s more than 1,000 times faster than my Apple ][, and 40 times faster than my NeXT cube that had a larger screen to deal with. If anything, the surprise should have been that it wasn’t faster, especially when considering that it also had a GPU to handle the screen.
This book will try to give insights into the underlying reasons for these developments in the context of Objective-C, Cocoa, and CocoaTouch, and attempt to provide techniques for taking full advantage of the raw power of our amazing computing machines—power that we tend to squander with reckless abandon. It will also try to show when it is actually OK to squander that power, and when it is necessary to pay careful attention. Programmer attention is also a scarce resource, too often squandered attempting to optimize parts of the program that do not matter.
General themes will include latency versus bandwidth, and transactions costs (overhead) versus actual work done, themes that are universal and manifest themselves in different forms at every level of the hardware and software stack.

What you will notice is that due to the speed of our machines, any single operation is, in fact, always more than fast enough, so the crucial equation is items cost. Most optimization is about reducing one or both of the parts of that formula, usually by breaking it up first.

One frequent method for reducing cost is to realize that cost is actually composed of two separate costs, cost1 and cost2, and only one of these needs to be applied to all items: items × (cost1 + cost2) cost1 + items × cost2. I would probably call this the fundamental optimization equation; a large part of the optimization techniques fall into this category, and it is also fundamental to the organization of most of the hardware/software stack we deal with every day.

This book has a very regular structure, with four basic areas of performance discussed in turn:
1. CPU performance
2. Memory
3. I/O
4. Graphics and responsiveness


Although an effort has been made to keep the treatment of each subject area independent, there is a logical progression, so at least a passing familiarity with earlier topics helps with later topics.
Within each of these four broad topics, there are again four specific areas of interest:

1. Principles
2. Measurement and tools
3. Pitfalls and techniques
4. Larger real-world examples of applying the techniques


Again, there is a logical structure: You need to have some idea about the principles and know how to measure before you can meaningfully think about actual performance optimization techniques, but again, you should also be able to dip into specific areas of interest if you have a passing familiarity with earlier topics.
This structure yields a total of 4 × 4 = 16 chapters, with a special chapter on Swift tucked between memory and I/O for a total of 17. Swift is also used throughout the book where appropriate, but it deserves a chapter of its own due to its unique performance characteristics.

For me, software performance is a passion and a calling that has been a common thread throughout my career. I have learned that performance is something you can’t automate, nor can you leave it until the last minute. On the other hand, there are many times when you shouldn’t worry about performance in order to have the capacity to concentrate on performance where it is really needed. If that weren’t paradoxical enough, having excellent base performance levels is often what makes it possible to get to that state of not having to worry about performance most of the time.

In short, this book is about making software that performs beautifully. 

Advanced Swift Bundle By Ray Wenderlich Latest version support Swift 5, IOS 13 PDF, EPUB File and Full Source Code


No comments:

Post a Comment