In-Place Sample Sorting with Splitter-Based Bucket Redistribution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In-place sorting techniques require excessive memory bandwidth and cache operations, while out-of-place techniques suffer from memory usage issues, especially when sorting large datasets, making them impractical for architectures with limited cache resources.

Innovation Solution

Implement in-place two-way partitioning using a smaller secondary memory segment for temporary storage, discarding bucket assignments, and redistributing elements based on splitter values to reduce memory requirements and improve cache efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If in-place sorting techniques are used, then memory usage is reduced, but memory bandwidth requirements increase significantly

Engineering Contradiction:
Improvememory usageVSAvoidmemory bandwidth
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent divides the sorting process into distinct phases (classification, permutation, collection) and segments the data into blocks that are processed separately. This allows the algorithm to work with smaller data portions at a time, reducing the memory bandwidth burden while maintaining in-place sorting benefits.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary classification of elements into blocks before the main sorting operation. By pre-organizing data into blocks during the classification phase, the subsequent permutation and collection phases require fewer memory accesses, thus reducing overall memory bandwidth requirements.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If block buffer size is reduced for architectures with small L2 cache, then cache efficiency improves, but the number of memory operations increases

Engineering Contradiction:
Improvecache efficiencyVSAvoidnumber of memory operations
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent optimizes the block buffer size to match the specific cache characteristics of the target architecture. By adjusting the block size to be appropriate for small L2 caches, the algorithm maximizes cache hit rates and minimizes expensive main memory accesses, achieving better overall performance despite increased operation counts.

Inventive Principle:
Principle #3Local quality

3Productivity

If out-of-place sorting techniques are used, then memory bandwidth usage is reduced, but memory storage requirements increase significantly

Engineering Contradiction:
Improvememory bandwidth usageVSAvoidmemory storage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent discards bucket assignment information (oracles) after the classification phase and recomputes it during the collection phase. This eliminates the need to store O(M) bucket assignment data, reducing memory storage requirements from O(M) to O(1) auxiliary space while maintaining the efficiency benefits of out-of-place techniques.

Inventive Principle:
Principle #34Discarding and recovering

Solution Approach 2:

The patent extracts and removes the bucket assignment storage requirement from the sorting algorithm by not preserving oracle values between phases. This extraction of the storage burden allows the algorithm to achieve low memory usage while maintaining efficient memory bandwidth utilization.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12585399B2In-place sorting
Publication Date: 2026.03.24 GDM HOLDING LLC
  • US12585399B2 patent drawing
  • US12585399B2 patent drawing
  • US12585399B2 patent drawing

AI summary

Implementations described herein relate to improved in-place sample sorting of data. In various implementations, unsorted elements of a set stored in a first memory segment may be compared to splitter values to determine respective counts of elements of the set that will fit into each of a plurality of buckets bounded by the splitter values. Some number of elements from each of multiple ranges of the first memory segment that correspond to the multiple buckets may be moved to a smaller second memory segment. Remaining elements may be redistributed from at least some of the plurality of ranges of the first memory segment across the plurality of ranges based on comparing the remaining elements to the splitter values. The elements from the second memory segment may then be distributed across the plurality of ranges based on comparing the elements to the splitter values.