Vector String Range Compare Instruction for Character Data Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current text processing methods are inefficient for comparing character data, particularly when dealing with character strings, as they typically compare data one byte at a time and lack effective mechanisms for tasks like finding termination points or determining string lengths.

Innovation Solution

The introduction of a Vector String Range Compare instruction that allows for simultaneous comparison of multiple elements in a vector register against a range of values, including the ability to search for null elements to determine string termination, using SIMD operations to enhance processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If current text processing methods compare character data one byte at a time, then the processing is simple to implement, but the processing efficiency is low

Engineering Contradiction:
Improvecharacter data processing efficiencyVSAvoidprocessing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments character data into multiple bytes that can be processed simultaneously using SIMD (Single Instruction Multiple Data) operations. The Vector String Range Compare instruction divides the character string into parallel byte segments, allowing each segment to be compared independently and concurrently, thereby improving processing efficiency while maintaining simplicity through vectorized operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the processing parameter from sequential byte-by-byte comparison to parallel vector comparison. By using the Vector String Range Compare instruction with SIMD technology, multiple bytes are processed in parallel within a single instruction cycle, fundamentally changing the time complexity from linear O(n) to a more efficient parallel operation that reduces overall processing time.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If sequential byte comparison is used, then the implementation is straightforward, but the ability to find termination points and determine string length is inefficient

Engineering Contradiction:
Improvestring processing speedVSAvoidinstruction complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The Vector String Range Compare instruction provides multi-functionality by simultaneously performing range comparison, termination point detection, and string length determination. This single instruction can identify null bytes (termination points) while comparing character ranges, eliminating the need for separate sequential operations and improving productivity without proportionally increasing complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent performs preliminary setup by loading character range bounds and comparison criteria into vector registers before executing the main comparison operation. This preliminary action allows the Vector String Range Compare instruction to efficiently scan for termination points and determine string lengths in a single pass, rather than requiring multiple sequential checks.

Inventive Principle:
Principle #10Preliminary action

3Loss of time

If parallel SIMD operations are used to compare multiple elements simultaneously, then processing efficiency improves, but the instruction complexity increases

Engineering Contradiction:
Improvecomparison timeVSAvoidinstruction set complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent introduces vector registers as intermediaries that hold character data and comparison criteria in parallel form. These vector registers serve as mediators between the input character string and the comparison logic, allowing SIMD operations to work with pre-prepared data structures. This intermediary approach simplifies the instruction complexity by providing a standardized interface for parallel operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the comparison task into distinct vector operations: loading data into vector registers, executing the Vector String Range Compare instruction, and harvesting results. This segmentation of the parallel processing task into manageable stages reduces instruction complexity by breaking down the complex SIMD operation into simpler, more manageable steps that can be executed in sequence.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP2825954B1Vector string range compare
Publication Date: 2021.06.02 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • EP2825954B1 patent drawingFigure 1~2B
  • EP2825954B1 patent drawingFigure 3
  • EP2825954B1 patent drawingFigure 4

AI summary

Processing of character data is facilitated. A Vector String Range Compare instruction is provided that compares each element of a vector with a range of values based on a set of controls to determine if there is a match. An index associated with the matched element or a mask representing the matched element is stored in a target vector register. Further, the same instruction, the Vector String Range Compare instruction, also searches a selected vector for null elements, also referred to as zero elements.