Download Code Speed Performance Guidelines (Legacy)
Transcript
Contents Introduction to Code Speed Performance Guidelines 5 Organization of This Document 5 Diagnosing Slow Operations 6 Checklist for Diagnosing Problems 6 Finding Time-Consuming Operations 7 Using Shark 7 Using the sample Command-Line Tool 10 Doing a More Thorough Analysis 11 Analyzing Sample Data 11 Check Your Algorithms 12 Measure First 12 Tuning at the Right Level 12 Avoid Costly Algorithms 13 Avoid Calls to the Shell 13 Impedance Mismatches 14 Use Existing Data Structures 14 Avoid Floating-Point to Integer Conversions 14 Core Foundation Calls 15 Perceived Responsiveness 17 Launch Time 17 Lengthy Operations 17 Avoid the Spinning Cursor 18 Detecting Polling Behavior 19 Accelerating Critical Code 20 Speeding Up Loop Operations 20 Removing Invariant Code 20 Unrolling Loops 21 Caching Method Implementations 22 Retired Document | 2014-03-10 | Copyright © 2003, 2014 Apple Inc. All Rights Reserved. 2