Faster Positional-Population Counts for AVX2, AVX-512, and ASIMD
Robert Clausecker, Daniel Lemire, Florian Schintke

TL;DR
This paper presents optimized SIMD algorithms for positional population counts, significantly improving speed and efficiency across multiple instruction sets like AVX2, AVX-512, and ASIMD, especially for small input arrays.
Contribution
The paper introduces a new SIMD-based algorithm for positional population counts with enhanced handling of unaligned and short arrays, achieving near memory-bound performance.
Findings
Approaches achieve near memory-bound speeds for small arrays.
Enhanced handling of unaligned and very short arrays.
Implementations for AVX2, AVX-512, and ASIMD are provided.
Abstract
The positional population count operation pospopcnt() counts for an array of w-bit words how often each of the w bits was set. Various applications in bioinformatics, database engineering, and digital processing exist. Building on earlier work by Klarqvist et al., we show how positional population counts can be rapidly computed using SIMD techniques with good performance from the first byte, approaching memory-bound speeds for input arrays of as little as 4 KiB. Improvements include an improved algorithm structure, better handling of unaligned and very short arrays, as well as faster bit-parallel accumulation of intermediate results. We provide a generic algorithm description as well as implementations for various SIMD instruction set extensions, including Intel AVX2, AVX-512, and ARM ASIMD, and discuss the adaption of our algorithm to other platforms.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMass Spectrometry Techniques and Applications · Metabolomics and Mass Spectrometry Studies · Data-Driven Disease Surveillance
