Faster-Than-Native Alternatives for x86 VP2INTERSECT Instructions
Guille D\'iez-Ca\~nas

TL;DR
This paper introduces optimized software-based methods using AVX512F instructions to emulate x86 VP2INTERSECT instructions more efficiently than native hardware, especially for list intersection tasks.
Contribution
It presents novel rotation-based emulation techniques that outperform native VP2INTERSECT instructions in typical intersection computations.
Findings
Emulations are faster than native instructions across all VP2INTERSECT subset instructions.
Rotating both operands simultaneously reduces total vector rotations needed.
Extensions to other input types like 16-bit vectors are straightforward.
Abstract
We present faster-than-native alternatives for the full AVX512-VP2INTERSECT instruction subset using basic AVX512F instructions. These alternatives compute only one of the output masks, which is sufficient for the typical case of computing the intersection of two sorted lists of integers, or computing the size of such an intersection. While the na\"ive implementation (compare the first input vector against all rotations of the second) is slower than the native instructions, we show that by rotating both the first and second operands at the same time there is a significant saving in the total number of vector rotations, resulting in the emulations being faster than the native instructions, for all instructions in the VP2INTERSECT subset. Additionally, the emulations can be easily extended to other types of inputs (e.g. packed vectors of 16-bit integers) for which native instructions are…
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
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Algorithms and Data Compression
