HackerPapers

arXiv:2112.06342cs.DS

Faster-Than-Native Alternatives for x86 VP2INTERSECT Instructions

Guille Díez-Cañas

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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ïve 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 not available.

arXiv comments
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms cs.PFPerformance

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jan 2025 to Jan 2025. Found in 1 HN submission from Jan 2024 to Jan 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • It seems that there are faster alternatives to it https://arxiv.org/abs/2112.06342 https://www.reddit.com/r/asm/comments/110pld0/fasterthannati...

      nextaccounticView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.