Team LiB
Previous Section Next Section

Local Optimizations

The following are some well-known methods of optimizing pieces of code. When using high level languages, some of these may be done automatically by your compiler's optimizer.

Precomputing Calculations

Remembering Calculation Results

Locality of Reference

Register Usage

Inline Functions

Optimized Instructions

Addressing Modes

Data Alignment

These are just a smattering of examples of the kinds of local optimizations possible. However, remember that the maintainability and readability of code is much more important except under extreme circumstances.


Team LiB
Previous Section Next Section