On the improvement of the in-place merge algorithm parallelization

05/26/2020
by   Berenger Bramas, et al.
0

In this paper, we present several improvements in the parallelization of the in-place merge algorithm, which merges two contiguous sorted arrays into one with an O(T) space complexity (where T is the number of threads). The approach divides the two arrays into as many pairs of partitions as there are threads available; such that each thread can later merge a pair of partitions independently of the others. We extend the existing method by proposing a new algorithm to find the median of two partitions. Additionally, we provide a new strategy to divide the input arrays where we minimize the data movement, but at the cost of making this stage sequential. Finally, we provide the so-called linear shifting algorithm that swaps two partitions in-place with contiguous data access. We emphasize that our approach is straightforward to implement and that it can also be used for external (out of place) merging. The results demonstrate that it provides a significant speedup compared to sequential executions, when the size of the arrays is greater than a thousand elements.

READ FULL TEXT
research
11/26/2022

Approaches to the Parallelization of Merge Sort in Python

The theory of divide-and-conquer parallelization has been well-studied i...
research
05/06/2013

A Contrario Selection of Optimal Partitions for Image Segmentation

We present a novel segmentation algorithm based on a hierarchical repres...
research
02/07/2019

Space-efficient merging of succinct de Bruijn graphs

We propose a new algorithm for merging succinct representations of de Br...
research
12/07/2020

Galloping in natural merge sorts

We study the algorithm TimSort and the sub-routine it uses to merge mono...
research
03/07/2022

Parallel Training of GRU Networks with a Multi-Grid Solver for Long Sequences

Parallelizing Gated Recurrent Unit (GRU) networks is a challenging task,...
research
05/17/2018

External memory BWT and LCP computation for sequence collections with applications

We propose an external memory algorithm for the computation of the BWT a...
research
06/09/2022

PartitionPIM: Practical Memristive Partitions for Fast Processing-in-Memory

Digital memristive processing-in-memory overcomes the memory wall throug...

Please sign up or login with your details

Forgot password? Click here to reset