Vectorized Sorted-Set Intersection Using Conflict-Detection SIMD
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing sorted-set intersection algorithms, such as scalar sorted-set intersection, are inefficient due to high comparison overhead, necessitating a method that can compare multiple values simultaneously to reduce execution time and implementation complexity.
Innovation Solution
The use of conflict-detection SIMD instructions, specifically AVX-512, to vectorize sorted-set intersection by loading subsets of values into a single vector, identifying common values, and writing them back into a result set, while advancing indices efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If scalar sorted-set intersection is used, then implementation complexity is low, but execution time is high due to sequential processing
Solution Approach 1:
The patent segments the sorted sets into fixed-size chunks (e.g., 16 elements per chunk) and processes multiple chunks in parallel using SIMD instructions. This segmentation enables vectorized processing while maintaining manageable implementation complexity through systematic chunk management and index tracking.
Solution Approach 2:
The patent replaces the mechanical sequential comparison approach with SIMD (Single Instruction, Multiple Data) vectorized operations. This substitution leverages hardware-level parallelism to perform multiple comparisons simultaneously, dramatically reducing execution time while the systematic chunk-processing approach keeps implementation complexity reasonable.
2Productivity
If thread-level parallelism is used, then parallelism is achieved, but overhead is high offsetting the benefit
Solution Approach 1:
The patent transitions from thread-level parallelism (one dimension of parallelism) to data-level parallelism using SIMD instructions (another dimension). This allows multiple data elements to be processed simultaneously within a single thread, achieving parallelism without the substantial overhead of thread management, synchronization, and memory allocation.
Solution Approach 2:
The patent substitutes thread-level parallelism with SIMD vectorized operations, replacing the mechanical overhead of thread management with efficient hardware-level data parallelism. This substitution maintains high productivity while significantly reducing the overhead associated with thread creation, synchronization, and context switching.
3Measurement precision
If more comparisons are performed, then intersection accuracy is improved, but comparison overhead increases
Solution Approach 1:
The patent replaces sequential scalar comparisons with parallel SIMD comparisons, enabling multiple value pairs to be compared simultaneously. This substitution maintains complete intersection accuracy by comparing all necessary elements while reducing comparison overhead through efficient vectorized operations that process multiple comparisons in a single instruction cycle.
Solution Approach 2:
The patent ensures continuous useful action by systematically processing all elements through vectorized comparisons without unnecessary gaps or redundant operations. The chunk-based approach with proper index tracking ensures that every element is compared exactly once with its counterpart, maintaining accuracy while eliminating wasted comparison cycles.
Data Source
AI summary
Vectorized sorted-set intersection is performed using conflict-detection single instruction, multiple data (SIMD) instructions. A first ordered subset of values of a first ordered set of distinct values and a second ordered subset of values of a second ordered set of distinct values is loaded into a register. A first value in the register that matches another value in the register (i.e., common values) is identified by performing an SIMD instruction. The first value is then stored in a result set representing a merge-sort result set between the first ordered set of distinct values and the second ordered set of distinct values.


