English

Approaches to the Parallelization of Merge Sort in Python

Distributed, Parallel, and Cluster Computing 2022-11-30 v1

Abstract

The theory of divide-and-conquer parallelization has been well-studied in the past, providing a solid basis upon which to explore different approaches to the parallelization of merge sort in Python. Python's simplicity and extensive selection of libraries make it the most popular scientific programming language, so it is a fitting language in which to implement and analyze these algorithms. In this paper, we use Python packages multiprocessing and mpi4py to implement several different parallel merge sort algorithms. Experiments are conducted on an academic supercomputer, upon which benchmarks are performed using Cloudmesh. We find that hybrid multiprocessing merge sort outperforms several other algorithms, achieving a 1.5x speedup compared to the built-in Python sorted() and a 34x speedup compared to sequential merge sort. Our results provide insight into different approaches to implementing parallel merge sort in Python and contribute to the understanding of general divide-and-conquer parallelization in Python on both shared and distributed memory systems.

Keywords

Cite

@article{arxiv.2211.16479,
  title  = {Approaches to the Parallelization of Merge Sort in Python},
  author = {Alexandra Yang},
  journal= {arXiv preprint arXiv:2211.16479},
  year   = {2022}
}

Comments

13 pages, 12 figures

R2 v1 2026-06-28T07:17:10.438Z