DocumentCode :
3368799
Title :
A Model for the Effect of Caching on Algorithmic Efficiency in Radix based Sorting
Author :
Maus, Arne ; Gjessing, Stein
Author_Institution :
Univ. of Oslo, Oslo
fYear :
2007
fDate :
25-31 Aug. 2007
Firstpage :
33
Lastpage :
33
Abstract :
This paper demonstrates that the algorithmic performance of end user programs may be greatly affected by the two or three level caching scheme of the processor, and we introduce a general but simple model that estimates this effect with good accuracy. Using 4 different processors and two simple tests, we demonstrate that a number of random reads and writes in an array can have a penalty factor of 40-70 compared to the exact same number of sequential array accesses. These effects from cache misses first occur when a randomly accessed array is larger than the L1 cache and even more so when the array does not fit in the much larger L2 cache. A similar but much smaller effect between sequential reads and writes in large arrays compared with smaller arrays is also reported. In the second part of this paper three versions of the well known Radix algorithm is used to demonstrate that the ´artificial´ results from the first part definitely occur in practice. These versions use one, two and three digits, and hence one, two or three full passes to sort an array. For small arrays the two and three digit Radix algorithms of course are much slower than the one digit version, but for larger arrays the former outperform the latter. For comparison, the radix sorting execution times are compared to Quicksort and Flashsort, a different one-digit sorting algorithm, both of which are outperformed by the two and three digit Radix algorithms. Finally, a simple model based on the penalty of cache misses is introduced, and we use this model to explain the demonstrated differences in algorithmic efficiency.
Keywords :
cache storage; randomised algorithms; sorting; algorithmic efficiency; caching scheme; end user programs; radix based sorting; randomly accessed array; Algorithm design and analysis; Bridges; Cache memory; Informatics; Performance evaluation; Prediction algorithms; Predictive models; Sequential analysis; Sorting; Testing; cache friendly algorithms; cache models; caches; radix; sorting;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering Advances, 2007. ICSEA 2007. International Conference on
Conference_Location :
Cap Esterel
Print_ISBN :
0-7695-2937-2
Electronic_ISBN :
978-0-7695-2937-0
Type :
conf
DOI :
10.1109/ICSEA.2007.6
Filename :
4299915
Link To Document :
بازگشت