00 000 calls 1 946596 946596 name sortwords findelerec

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and all the tests we have run, require relatively small amounts of memory. For example, the combining routines were measured over vectors of length 1024, requiring no more than 8,096 bytes of data. All modern processors contain one or more cache memories to provide fast access to such small amounts of memory. All of the timings in Figure 5.12 assume that the data being read or written 5.13. UNDERSTANDING MEMORY PERFORMANCE 253 code/opt/list.c 1 2 3 4 5 6 7 8 9 10 11 12 13 typedef struct ELE { struct ELE *next; int data; } list_ele, *list_ptr; static int list_len(list_ptr ls) { int len = 0; for (; ls; ls = ls->next) len++; return len; } code/opt/list.c Figure 5.30: Linked List Functions. These illustrate the latency of the load operation. is contained in cache. In Chapter 6, we go into much more detail about how caches work and how to write code that makes best use of the cache. In this section, we will further investigate the performance of load and store operations while maintaining...
View Full Document

Ask a homework question - tutors are online