Changes

Jump to: navigation, search

Computer Architecture

261 bytes added, 00:00, 20 February 2018
Processor-specific Optimizations
Code which is optimized for a particular architecture will take advantage of the features of that architecture, such as the full register file. However, the performance may still vary significantly between processor models within that architecture -- for example, a loop that is small enough to fit in the cache of one processor model may not fit inside the smaller cache of another model within the same architecture family. Likewise, a particular instruction sequence may be optimal for one processor model with a particular combination of execution units, but suboptimal for another model with a different set of units. However, the variation from model to model is usually not huge.
Most modern compilers, such as gcc, enable you to set the overall target architecture, but also permit you to optimize performance for a specific CPU model within that target architecture. For example, with GCC, the <code>-march</code> argument selects the target architecture for the output code and the specific features that may be accessed by that code, while <code>-mtune</code> is used to optimize the performance for a particular CPU variant.

Navigation menu