SIMD Key Value Lookup Instruction for Processor Throughput
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing key value lookup operations in processors are inefficient due to high branch prediction penalties and increased overhead from conditional branches, especially in SIMD architectures where each key input must be compared sequentially to a large set of keys.
Innovation Solution
Implementing a Single Instruction, Multiple Data (SIMD) key value lookup instruction that uses two registers to store sets of keys and values, allowing for parallel comparisons of key inputs to keys and generating a permute index to efficiently retrieve associated values, thereby reducing branch mispredictions and increasing throughput.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If sequential comparison of key inputs to keys is performed in SIMD architectures, then key value lookup can be implemented, but branch prediction penalties and conditional branch overhead increase
Solution Approach 1:
The patent extracts the branch prediction problem by replacing conditional branches with a permutation-based lookup mechanism. Instead of using conditional branches to select values based on key matches, the invention uses a permutation vector to directly index into the value array, eliminating the need for branch prediction and associated penalties.
Solution Approach 2:
The patent introduces a permutation vector as an intermediary data structure that mediates between key comparison results and value selection. This permutation vector acts as a lookup table that maps key match positions to corresponding value positions, allowing the system to retrieve values through direct indexing rather than conditional branching.
2Measurement precision
If sequential comparison is used for each key input, then accurate key matching is achieved, but processing time increases
Solution Approach 1:
The patent merges multiple comparison operations into a single parallel operation by comparing all key inputs against all keys simultaneously using vectorized instructions. This combines the accuracy of sequential comparison with the speed of parallel processing, achieving both precise key matching and high throughput.
Solution Approach 2:
The patent transitions from sequential one-dimensional processing to parallel multi-dimensional processing by organizing keys and key inputs as vectors. This allows simultaneous comparison across multiple dimensions (all key-input pairs), dramatically increasing processing speed while maintaining matching accuracy through the use of permutation vectors for result aggregation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Single Instruction, Multiple Data (SIMD) technologies are described. A method of performing a key value lookup instruction may include storing a vector of keys to a first register and storing a vector of values corresponding to the keys to a second register. A processor may receive an instruction to perform a key value lookup instruction including a vector of key input elements. The processor may compare each key input element to each key to determine matching keys. The processor may then store values corresponding to the matching keys to an output vector in the position of the key input elements.