Introduction to Code Size Performance Guidelines
In the context of performance, there is a distinct correlation between memory usage and efficiency. The more memory your application occupies, the more inefficient it is going to be. More memory means more memory allocations, more code, and a greater potential for paging.
The focus of this programming topic is on the reduction of your executable code. Reducing your code footprint is not just a matter of turning on code optimizations in your compiler, although that does help. You can also reduce your code footprint by organizing your code so that only the minimum set of required functions is in memory at any given time. You implement this optimization by profiling your code.
Reducing the amount of memory allocated by your application is also important in reducing your memory footprint; however, that information is covered in Memory Usage Performance Guidelines in Performance Documentation.
Organization of This Document
This programming topic contains the following articles:
“Overview of the Mach-O Executable Format” describes how to use the organization of the Mach-O executable format to improve the efficiency of your code.
“Managing Code Size” describes several compiler options that you can use to reduce the overall size of your executables.
“Improving Locality of Reference” describes how to profile and reorganize your code to improve loading times for code segments.
“Reducing Shared Memory Pages” describes ways to reduce the size of your
“Minimizing Your Exported Symbols” shows how you identify and eliminate unnecessary symbol information in your code.
© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-06-28)