[Paper Review] Parallelize Bubble Sort Algorithm Using OpenMP
This paper proposes a parallelized version of the bubble sort algorithm using OpenMP to improve performance on multi-core systems. By partitioning input data into sub-arrays based on word length and leveraging shared-memory parallelism with two data structures (vectors of strings and 3D arrays), the authors demonstrate that the 3D array approach yields superior performance on an Intel Core i7-3610QM with 8 CPUs.
Sorting has been a profound area for the algorithmic researchers and many resources are invested to suggest more works for sorting algorithms. For this purpose, many existing sorting algorithms were observed in terms of the efficiency of the algorithmic complexity. In this paper we implemented the bubble sort algorithm using multithreading (OpenMP). The proposed work tested on two standard datasets (text file) with different size . The main idea of the proposed algorithm is distributing the elements of the input datasets into many additional temporary sub-arrays according to a number of characters in each word. The sizes of each of these sub-arrays are decided depending on a number of elements with the same number of characters in the input array. We implemented OpenMP using Intel core i7-3610QM ,(8 CPUs),using two approaches (vectors of string and array 3D) . Finally, we get the data structure effects on the performance of the algorithm for that we choice the second approach.
Motivation & Objective
- To enhance the performance of the inherently sequential bubble sort algorithm through parallelization.
- To investigate the impact of data structure choice (vectors vs. 3D arrays) on parallel sorting efficiency.
- To evaluate the scalability and runtime performance of the parallelized bubble sort on multi-core architectures.
- To explore data partitioning strategies based on word length to enable effective parallel processing.
Proposed method
- Partitioned input datasets into temporary sub-arrays based on the number of characters in each word.
- Implemented multithreading using OpenMP on an Intel Core i7-3610QM with 8 CPU cores.
- Explored two data structures: vector of strings and 3D array for storing sub-arrays.
- Distributed elements into sub-arrays according to their character count to balance workload.
- Executed parallel sorting on each sub-array using OpenMP directives for parallel regions.
- Measured performance differences between the two data structure implementations to identify optimal design.
Experimental results
Research questions
- RQ1Can the bubble sort algorithm be effectively parallelized using OpenMP to reduce execution time?
- RQ2How does data partitioning by word length affect load balancing and performance in parallel bubble sort?
- RQ3Which data structure—vector of strings or 3D array—yields better performance in the parallel implementation?
- RQ4What is the impact of input size and character distribution on the scalability of the parallelized algorithm?
- RQ5How does the choice of data structure influence memory access patterns and runtime efficiency?
Key findings
- The 3D array approach outperformed the vector of strings implementation in terms of execution time and memory access efficiency.
- Parallelization using OpenMP reduced sorting time compared to the sequential bubble sort, particularly for larger datasets.
- Data partitioning based on word length enabled effective load distribution across threads.
- The performance gain was more pronounced with larger input sizes due to better utilization of multiple cores.
- The choice of data structure significantly influenced runtime, with the 3D array providing better memory locality and cache behavior.
- The algorithm demonstrated measurable speedup on the Intel Core i7-3610QM with 8 CPUs, validating the effectiveness of the parallelization strategy.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.