About the Author |
|
xv | |
Introduction |
|
xvii | |
|
|
1 | (16) |
|
|
2 | (8) |
|
The Perils of (Micro-)Benchmarking |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
7 | (3) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (2) |
|
|
14 | (2) |
|
|
16 | (1) |
|
2 CPU: Measurement and Tools |
|
|
17 | (24) |
|
|
18 | (4) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
20 | (2) |
|
|
22 | (1) |
|
|
22 | (13) |
|
|
23 | (2) |
|
|
25 | (2) |
|
|
27 | (2) |
|
|
29 | (3) |
|
|
32 | (2) |
|
|
34 | (1) |
|
|
35 | (3) |
|
|
37 | (1) |
|
|
38 | (1) |
|
Optimization Beyond the Call of Duty |
|
|
38 | (1) |
|
|
39 | (2) |
|
3 CPU: Pitfalls and Techniques |
|
|
41 | (38) |
|
|
41 | (7) |
|
|
42 | (3) |
|
|
45 | (3) |
|
|
48 | (16) |
|
|
48 | (4) |
|
|
52 | (1) |
|
Object Creation and Caching |
|
|
52 | (1) |
|
|
53 | (2) |
|
|
55 | (1) |
|
|
56 | (2) |
|
Pitfall: Generic (Intermediate) Representations |
|
|
58 | (1) |
|
Arrays and Bulk Processing |
|
|
59 | (2) |
|
|
61 | (3) |
|
|
64 | (7) |
|
|
66 | (3) |
|
|
69 | (2) |
|
Uniformity and Optimization |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
72 | (3) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
75 | (4) |
|
4 CPU Example: XML Parsing |
|
|
79 | (20) |
|
|
80 | (3) |
|
Mapping Callbacks to Messages |
|
|
83 | (2) |
|
|
85 | (2) |
|
|
87 | (3) |
|
|
90 | (3) |
|
|
93 | (1) |
|
Optimizing the Whole Widget: MAX |
|
|
94 | (2) |
|
|
96 | (1) |
|
|
97 | (2) |
|
|
99 | (20) |
|
|
99 | (6) |
|
|
105 | (1) |
|
|
106 | (7) |
|
|
108 | (2) |
|
Heap Allocation with malloc() |
|
|
110 | (3) |
|
|
113 | (4) |
|
|
114 | (1) |
|
Foundation Object Ownership |
|
|
114 | (1) |
|
|
115 | (1) |
|
Automatic Reference Counting |
|
|
116 | (1) |
|
Process-Level Resource Reclamation |
|
|
117 | (1) |
|
|
117 | (2) |
|
6 Memory: Measurement and Tools |
|
|
119 | (18) |
|
|
119 | (1) |
|
|
120 | (5) |
|
|
120 | (1) |
|
|
121 | (3) |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
126 | (10) |
|
|
126 | (1) |
|
|
127 | (7) |
|
|
134 | (1) |
|
|
134 | (2) |
|
|
136 | (1) |
|
7 Memory: Pitfalls and Techniques |
|
|
137 | (24) |
|
|
137 | (4) |
|
|
139 | (2) |
|
Foundation Objects vs. Primitives |
|
|
141 | (1) |
|
|
142 | (4) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
Architectural Considerations |
|
|
147 | (4) |
|
Temporary Allocations and Object Caching |
|
|
151 | (2) |
|
|
153 | (1) |
|
|
153 | (3) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (3) |
|
|
160 | (1) |
|
8 Memory Example: FilterStreams |
|
|
161 | (12) |
|
|
161 | (2) |
|
|
163 | (1) |
|
|
164 | (6) |
|
Eliminating the Infinite Recursion from description |
|
|
168 | (2) |
|
|
170 | (1) |
|
|
171 | (2) |
|
|
173 | (32) |
|
Swift Performance: Claims |
|
|
173 | (4) |
|
|
175 | (2) |
|
|
177 | (1) |
|
Assessing Swift Performance |
|
|
177 | (11) |
|
Basic Performance Characteristics |
|
|
177 | (2) |
|
|
179 | (9) |
|
|
188 | (3) |
|
|
188 | (1) |
|
|
189 | (1) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (4) |
|
|
191 | (2) |
|
|
193 | (1) |
|
Whole-Module Optimization |
|
|
194 | (1) |
|
Controlling Compile Times |
|
|
195 | (1) |
|
Optimizer-Oriented Programming |
|
|
195 | (2) |
|
A Sufficiently Smart Compiler |
|
|
197 | (7) |
|
The Death of Optimizing Compilers |
|
|
199 | (2) |
|
|
201 | (1) |
|
|
201 | (3) |
|
|
204 | (1) |
|
|
205 | (10) |
|
|
205 | (3) |
|
|
205 | (2) |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
208 | (6) |
|
Abstraction: Byte Streams |
|
|
208 | (2) |
|
|
210 | (3) |
|
|
213 | (1) |
|
|
214 | (1) |
|
11 I/O: Measurement and Tools |
|
|
215 | (10) |
|
Negative Space: top and time |
|
|
216 | (1) |
|
Summary Information: iostat and netstat |
|
|
217 | (1) |
|
|
218 | (3) |
|
Detailed Tracing: fs_usage |
|
|
221 | (3) |
|
|
224 | (1) |
|
12 I/O: Pitfalls and Techniques |
|
|
225 | (42) |
|
Pushing Bytes with NSData |
|
|
225 | (5) |
|
|
226 | (2) |
|
|
228 | (2) |
|
|
230 | (2) |
|
|
232 | (10) |
|
|
233 | (1) |
|
|
234 | (2) |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
238 | (4) |
|
|
242 | (11) |
|
|
244 | (1) |
|
|
244 | (2) |
|
|
246 | (3) |
|
|
249 | (3) |
|
|
252 | (1) |
|
|
253 | (8) |
|
Create and Update in Batches |
|
|
254 | (2) |
|
Fetch and Fault Techniques |
|
|
256 | (4) |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
261 | (1) |
|
|
261 | (3) |
|
Relational and Other Databases |
|
|
263 | (1) |
|
|
264 | (1) |
|
|
264 | (1) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
267 | (28) |
|
|
267 | (4) |
|
|
271 | (11) |
|
A Binary Property List Reader |
|
|
271 | (5) |
|
|
276 | (3) |
|
Avoiding Intermediate Representations |
|
|
279 | (3) |
|
|
282 | (1) |
|
Public Transport Schedule Data |
|
|
283 | (5) |
|
|
285 | (1) |
|
|
286 | (2) |
|
|
288 | (5) |
|
|
288 | (1) |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
290 | (3) |
|
|
293 | (2) |
|
14 Graphics and UI: Principles |
|
|
295 | (14) |
|
|
295 | (1) |
|
|
296 | (3) |
|
Quartz and the PostScript Imaging Model |
|
|
299 | (1) |
|
|
300 | (1) |
|
|
301 | (1) |
|
Graphics Hardware and Acceleration |
|
|
301 | (4) |
|
From Quartz Extreme to Core Animation |
|
|
305 | (3) |
|
|
308 | (1) |
|
15 Graphics and UI: Measurement and Tools |
|
|
309 | (16) |
|
CPU Profiling with Instruments |
|
|
310 | (1) |
|
|
311 | (1) |
|
Core Animation Instrument |
|
|
312 | (6) |
|
When the CPU Is Not the Problem |
|
|
314 | (4) |
|
|
318 | (5) |
|
|
323 | (2) |
|
16 Graphics and UI: Pitfalls and Techniques |
|
|
325 | (18) |
|
|
325 | (1) |
|
|
326 | (1) |
|
Too Much Communication Slows Down Installation |
|
|
327 | (3) |
|
|
327 | (2) |
|
Working with the Display Throttle |
|
|
329 | (1) |
|
Installers and Progress Reporting Today |
|
|
329 | (1) |
|
|
330 | (2) |
|
|
332 | (6) |
|
Image Scaling and Cropping |
|
|
333 | (2) |
|
|
335 | (1) |
|
How Definitely Not to Draw Thumbnails |
|
|
335 | (1) |
|
How to Not Really Draw Thumbnails |
|
|
336 | (1) |
|
How to Draw Non-Thumbnails |
|
|
337 | (1) |
|
|
338 | (3) |
|
|
341 | (2) |
|
17 Graphics and UI: Examples |
|
|
343 | (16) |
|
|
343 | (7) |
|
|
343 | (1) |
|
|
344 | (1) |
|
|
345 | (2) |
|
|
347 | (1) |
|
|
347 | (2) |
|
|
349 | (1) |
|
|
350 | (1) |
|
|
350 | (7) |
|
|
350 | (1) |
|
|
351 | (1) |
|
|
352 | (1) |
|
An Eventually Consistent Asynchronous Data Source |
|
|
353 | (1) |
|
|
354 | (1) |
|
A Smooth and Responsive UI |
|
|
355 | (2) |
|
|
357 | (1) |
|
|
357 | (2) |
Index |
|
359 | |