A Hybrid Vectorized Merge Sort on ARM NEON

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhou, Jincheng, Zhang, Jin, Zhang, Xiang, Xiao, Tiaojie, Ma, Di, Gong, Chunye
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929489501487104
author Zhou, Jincheng
Zhang, Jin
Zhang, Xiang
Xiao, Tiaojie
Ma, Di
Gong, Chunye
author_facet Zhou, Jincheng
Zhang, Jin
Zhang, Xiang
Xiao, Tiaojie
Ma, Di
Gong, Chunye
contents Sorting algorithms are the most extensively researched topics in computer science and serve for numerous practical applications. Although various sorts have been proposed for efficiency, different architectures offer distinct flavors to the implementation of parallel sorting. In this paper, we propose a hybrid vectorized merge sort on ARM NEON, named NEON Merge Sort for short (NEON-MS). In detail, according to the granted register functions, we first identify the optimal register number to avoid the register-to-memory access, due to the write-back of intermediate outcomes. More importantly, following the generic merge sort framework that primarily uses sorting network for column sort and merging networks for three types of vectorized merge, we further improve their structures for high efficiency in an unified asymmetry way: 1) it makes the optimal sorting networks with few comparators become possible; 2) hybrid implementation of both serial and vectorized merges incurs the pipeline with merge instructions highly interleaved. Experiments on a single FT2000+ core show that NEON-MS is 3.8 and 2.1 times faster than std::sort and boost::block\_sort, respectively, on average. Additionally, as compared to the parallel version of the latter, NEON-MS gains an average speedup of 1.25.
format Preprint
id arxiv_https___arxiv_org_abs_2409_03970
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Hybrid Vectorized Merge Sort on ARM NEON
Zhou, Jincheng
Zhang, Jin
Zhang, Xiang
Xiao, Tiaojie
Ma, Di
Gong, Chunye
Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
Sorting algorithms are the most extensively researched topics in computer science and serve for numerous practical applications. Although various sorts have been proposed for efficiency, different architectures offer distinct flavors to the implementation of parallel sorting. In this paper, we propose a hybrid vectorized merge sort on ARM NEON, named NEON Merge Sort for short (NEON-MS). In detail, according to the granted register functions, we first identify the optimal register number to avoid the register-to-memory access, due to the write-back of intermediate outcomes. More importantly, following the generic merge sort framework that primarily uses sorting network for column sort and merging networks for three types of vectorized merge, we further improve their structures for high efficiency in an unified asymmetry way: 1) it makes the optimal sorting networks with few comparators become possible; 2) hybrid implementation of both serial and vectorized merges incurs the pipeline with merge instructions highly interleaved. Experiments on a single FT2000+ core show that NEON-MS is 3.8 and 2.1 times faster than std::sort and boost::block\_sort, respectively, on average. Additionally, as compared to the parallel version of the latter, NEON-MS gains an average speedup of 1.25.
title A Hybrid Vectorized Merge Sort on ARM NEON
topic Distributed, Parallel, and Cluster Computing
Data Structures and Algorithms
url https://arxiv.org/abs/2409.03970