November 1999
Intermediate to advanced
336 pages
6h 29m
English
Caching is often associated with data and instruction caching on modern processors. But, caching opportunities appear in much wider contexts, including application-level coding and design. Caching is about remembering the results of frequent and costly computations, so that you will not have to perform those computations over and over again.
Caching opportunities are easier to detect and implement in the coding arena. Evaluating constant expressions inside a loop is a well known performance inefficiency. For example:
for(... ;!done;... ) {
done = patternMatch(pat1, pat2, isCaseSensitive());
}
The patternMatch() function takes two string patterns to match and a third argument indicating whether a case-sensitive match is required. The ...
Read now
Unlock full access