13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GENERAL OPTIMIZATION GUIDELINEScompatible approach to optimization is also likely to deliver high performance onPentium M, Intel Core Solo <strong>and</strong> Intel Core Duo processors.3.2.2 Transparent Cache-Parameter StrategyIf the CPUID instruction supports function leaf 4, also known as deterministic cacheparameter leaf, the leaf reports cache parameters for each level of the cache hierarchyin a deterministic <strong>and</strong> forward-compatible manner across Intel <strong>64</strong> <strong>and</strong> <strong>IA</strong>-<strong>32</strong>processor families.For coding techniques that rely on specific parameters of a cache level, using thedeterministic cache parameter allows software to implement techniques in a way thatis forward-compatible with future generations of Intel <strong>64</strong> <strong>and</strong> <strong>IA</strong>-<strong>32</strong> processors, <strong>and</strong>cross-compatible with processors equipped with different cache sizes.3.2.3 Threading Strategy <strong>and</strong> Hardware Multithreading SupportIntel <strong>64</strong> <strong>and</strong> <strong>IA</strong>-<strong>32</strong> processor families offer hardware multithreading support in twoforms: dual-core technology <strong>and</strong> HT Technology.To fully harness the performance potential of hardware multithreading in current <strong>and</strong>future generations of Intel <strong>64</strong> <strong>and</strong> <strong>IA</strong>-<strong>32</strong> processors, software must embrace athreaded approach in application design. At the same time, to address the widestrange of installed machines, multi-threaded software should be able to run withoutfailure on a single processor without hardware multithreading support <strong>and</strong> shouldachieve performance on a single logical processor that is comparable to anunthreaded implementation (if such comparison can be made). This generallyrequires architecting a multi-threaded application to minimize the overhead of threadsynchronization. Additional guidelines on multithreading are discussed in Chapter 8,“Multicore <strong>and</strong> Hyper-Threading Technology.”3.3 CODING RULES, SUGGESTIONS AND TUNING HINTSThis section includes rules, suggestions <strong>and</strong> hints. They are targeted for engineerswho are:• modifying source code to enhance performance (user/source rules)• writing assemblers or compilers (assembly/compiler rules)• doing detailed performance tuning (tuning suggestions)Coding recommendations are ranked in importance using two measures:• Local impact (high, medium, or low) refers to a recommendation’s affect on theperformance of a given instance of code.• Generality (high, medium, or low) measures how often such instances occuracross all application domains. Generality may also be thought of as “frequency”.3-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!