NASA Logo

NTRS

NTRS - NASA Technical Reports Server

Press Enter or click the Search button to begin your search.

Back to Results
On the Efficacy of Source Code Optimizations for Cache-Based SystemsObtaining high performance without machine-specific tuning is an important goal of scientific application programmers. Since most scientific processing is done on commodity microprocessors with hierarchical memory systems, this goal of "portable performance" can be achieved if a common set of optimization principles is effective for all such systems. It is widely believed, or at least hoped, that portable performance can be realized. The rule of thumb for optimization on hierarchical memory systems is to maximize temporal and spatial locality of memory references by reusing data and minimizing memory access stride. We investigate the effects of a number of optimizations on the performance of three related kernels taken from a computational fluid dynamics application. Timing the kernels on a range of processors, we observe an inconsistent and often counterintuitive impact of the optimizations on performance. In particular, code variations that have a positive impact on one architecture can have a negative impact on another, and variations expected to be unimportant can produce large effects. Moreover, we find that cache miss rates - as reported by a cache simulation tool, and confirmed by hardware counters - only partially explain the results. By contrast, the compiler-generated assembly code provides more insight by revealing the importance of processor-specific instructions and of compiler maturity, both of which strongly, and sometimes unexpectedly, influence performance. We conclude that it is difficult to obtain performance portability on modern cache-based computers, and comment on the implications of this result.
Document ID
20020069121
Acquisition Source
Ames Research Center
Document Type
Preprint (Draft being sent to journal)
Authors
VanderWijngaart, Rob F.
(MRJ Technology Solutions, Inc. Moffett Field, CA United States)
Saphir, William C.
(California Univ., Lawrence Berkeley National Lab. Berkeley, CA United States)
Date Acquired
September 7, 2013
Publication Date
January 1, 1998
Subject Category
Computer Operations And Hardware
Funding Number(s)
PROJECT: RTOP 519-40-12
CONTRACT_GRANT: NAS2-14303
Distribution Limits
Public
Copyright
Work of the US Gov. Public Use Permitted.
No Preview Available