Title :
Quick-merge sort algorithm based on Multi-core linux
Author :
Yong Liu ; Yan Yang
Author_Institution :
Key Lab. of Database & Parallel Comput. of Heilongjiang Province, Heilongjiang Univ., Harbin, China
Abstract :
Sorting a list of input numbers is one of the most fundamental problems in the field of computer science. This paper presents an efficient implementation and detailed analysis of quick sort algorithm called QM-sort on Multi-core CPU architectures. Our QM-sort has two stages. The first stage is making blocks sorted, and the second stage is merging the sorted blocks. At the first stage, we propose a parallel quick sort algorithm named BPQsort. The run time of BPQsort achieves 40%-50% better than Qsort (STL), so we make blocks sorted more efficient. On the other hand, our algorithm can read file in parallel, thus reduce the time of reading file from disk. At the second stage, our parallel merge algorithm can operate the data on consecutive memory. Thus we avoid the expensive unaligned load/store operations, thus make our merge algorithm faster. At last, the run time of QM-sort is 10%-15% better than quick sort based on OpenMP.
Keywords :
Linux; multiprocessing systems; sorting; BPQsort algorithm; OpenMP; QM-sort algorithm; block sorting; computer science; load-store operations; multicore CPU architecture; multicore Linux; parallel quick sort algorithm; quick sort algorithm; quick-merge-sort algorithm; Algorithm design and analysis; Hardware; Instruction sets; Linux; Linux; Multi-core CPU; Multi-thread; QuickSort; Sort;
Conference_Titel :
Mechatronic Sciences, Electric Engineering and Computer (MEC), Proceedings 2013 International Conference on
Conference_Location :
Shengyang
Print_ISBN :
978-1-4799-2564-3
DOI :
10.1109/MEC.2013.6885313