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 GUIDELINESExample 3-28. Code That Causes Cache Line Splitmov esi, 029e70fehmov edi, 05be5260hBlockmove:mov eax, DWORD PTR [esi]mov ebx, DWORD PTR [esi+4]mov DWORD PTR [edi], eaxmov DWORD PTR [edi+4], ebxadd esi, 8add edi, 8sub edx, 1jnz BlockmoveFigure 3-2 illustrates the situation of accessing a data element that span acrosscache line boundaries.Address 029e70c1hAddress 029e70fehCache Line 029e70c0hIndex 0Cache Line 029e7100hIndex 0 cont'dIndex 1Index 15 Index 16Cache Line 029e7140hIndex 16 cont'd Index 17Index 31 Index <strong>32</strong>Figure 3-2. Cache Line Split in Accessing Elements in a ArrayAlignment of code is less important for processors based on Intel NetBurst microarchitecture.Alignment of branch targets to maximize b<strong>and</strong>width of fetching cachedinstructions is an issue only when not executing out of the trace cache.Alignment of code can be an issue for the Pentium M, Intel Core Duo <strong>and</strong> Intel Core 2Duo processors. Alignment of branch targets will improve decoder throughput.3-49

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

Saved successfully!

Ooh no, something went wrong!