期刊文献+

一种基于划分与归并的并行快速排序算法 被引量:4

A Parallel Quicksort Algorithm Based on Partition and Merge Operations
下载PDF
导出
摘要 排序作为一种计算机程序设计中的重要操作在海量数据条件下应快速且高效。而且随着当今处理器生产工艺的不断进步,如今的笔记本电脑、台式机乃至商用服务器至少也都是双核处理器,4核、8核乃至16核也并不罕见,如果是单线程的程序,那么在双核处理器上运行便浪费了50%的性能,在4核处理器上运行便浪费了75%的性能。而多核处理器上的多线程能让多段程序逻辑同时工作,可以真正发挥出多核处理器的优势,而达到充分利用处理器的目的。为了提升排序操作的性能,使用灵活的OpenMP并行函数库以及C/C++语言标准库中提供的快速排序函数qsort实现了一种可以运行于任意共享存储多核计算机上的并行快速排序算法。实验结果表明:以同条件下标准库串行快速排序函数qsort作为测试基准,最终在英特尔酷睿i7-4790处理器平台上8线程条件下对200M随机整型数据的排序将性能提升了11.92倍,在相同的数据条件下,英特尔酷睿2-Q9400处理器平台上也可将性能提升4.75倍。 As an important operation in computer programming,sorting should be faster and more efficient under big data conditions.Along with the continual progress in the modern processor production technology,laptops,desktops,and commercial servers are equipped with at least dual-core processors,and 4-core,8-core and 16-core processors are not rare any more.It is a 50%waste of the performance to run a single-thread program on a dual-core processor,as well as a 75%waste on a 4-core processor.The multiple program logic can be run simultaneously by the multithread multicore processors,and the advantage of multicore processors can be given actually,which achieves the purpose of making full use of processors.To improve the performance of sorting operations,the flexible parallel library OpenMP and the quicksort function qsort provided in the C/C++language standard library are adopted.A parallel quicksort algorithm on any shared-memory parallel computer is implemented.The experimental results show that under the same condition,taking the standard library serial quicksort function qsort as the benchmark,the performance of the 200M random integer data has been increased by 11.92 times under the eight-thread condition on the Intel Core i7-4790 processor platform.On the same data,that of Intel Core 2 Quad Q9400 processor has been improved by 4.75 times.
作者 贾思禹 JIA Siyu(College of Computer Science and Software Engineering,Tianjin Polytechnic University,Tianjin 300387)
出处 《计算机与数字工程》 2019年第10期2438-2445,共8页 Computer & Digital Engineering
关键词 并行化 快速排序 多核心 多线程 OPENMP Parallel QuickSort Multicore Multithread OpenMP
  • 相关文献

参考文献2

二级参考文献13

  • 1唐向阳.分段快速排序法[J].软件学报,1993,4(2):53-57. 被引量:48
  • 2周建钦.超快速排序算法[J].计算机工程与应用,2006,42(29):41-42. 被引量:17
  • 3严蔚敏,吴伟民.数据结构[M].北京:清华大学出版社,2008:81-84.
  • 4秦锋,汤文兵,章曙光,等.数据结构[M].合肥:中国科学技术大学出版社.2007:101-102.
  • 5Cantone D, Cincotti G. QuickHeapsort: An Efficient Mix of Classical Sorting Algorithms[J]. The Oretical Computer Science, 2002, 285: 25-42.
  • 6WANG YINGXU. A new sort algorithm: serf-indexed sort [ J]. Com- munications of ACM SIGPALN, 1996, 31(3) : 28 - 36.
  • 7DONGARRA J. SULLIVAN F. Guest editors introduction to the top 10 algorithm[ J]. IEEE Computing in Seience & Engineering, 2000, 2(1) : 22 - 23.
  • 8DOBBS. Quicksort and radix sorts on lists pigeon [ J]. Software Tools for the Professional Programmer, 2002 (27) : 89 -91.
  • 9张小涛,万建成,侯金奎,冯仕红.递归和复杂用户界面的设计模式[J].计算机工程,2008,34(14):52-54. 被引量:3
  • 10王向阳.任意分布数据的基数分配链接排序算法[J].计算机学报,2000,23(7):774-778. 被引量:27

共引文献18

同被引文献31

引证文献4

二级引证文献4

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部