计算机应用 ›› 2010, Vol. 30 ›› Issue (9): 2374-2378.

• 软件过程技术 • 上一篇    下一篇

分割方式的多线程快速排序算法

宋鸿陟1,傅熠1,张丽霞2,彭红星3,梁华坤3   

  1. 1. 华南农业大学
    2. 华南农业大学信息学院
    3.
  • 收稿日期:2010-03-10 修回日期:2010-05-02 发布日期:2010-09-03 出版日期:2010-09-01
  • 通讯作者: 傅熠
  • 基金资助:
    焦点与上下文技术研究及其在常用人机界面中的应用

Multi-thread quicksort algorithm based on partitioning

  • Received:2010-03-10 Revised:2010-05-02 Online:2010-09-03 Published:2010-09-01
  • Contact: Floyd Fu

摘要: 基于Java平台先对经典快速排序的改进方法作了介绍,通过测试得出了一个合适的经验阈值,改善了快速排序在小数据量情况下的低效问题。然后对快速排序作了多线程优化,并进行了单、多线程的对比测试,结果显示在多核主机上能有几倍的速度提升。最后对多线程快速排序算法进行了理论分析,得出了该算法速度的理论上限。

关键词: 分割, 快速排序, 多线程, 效率上限, 多核技术

Abstract: Firstly, the improved method based on Java was introduced. A reasonable experimental threshold had been obtained, which improved the efficiency of quicksort when sorting a small dataset. Secondly, quicksort was optimized by using the multi-thread technology, and experiments were conducted to compare the performance of the single-thread and multi-thread algorithms. The results show that the multi-thread algorithm is several times faster than the single-thread one on multi-core computers. Finally, theoretical analysis was made on multi-thread quicksort algorithm, and the theoretical upper limit of the algorithm was obtained on multi-core computers.

Key words: partition, quicksort, multi-thread, performance limit, multi-core technology

中图分类号: