DFA Range Slots for Cache-Efficient Regex Acceleration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The size of deterministic finite automaton (DFA) graphs grows exponentially, leading to increased memory footprint and reduced performance in regular expression processing, particularly for simple patterns.

Innovation Solution

Implementing range slots in DFA graphs to capture groups of transitions, reducing the graph size by a factor of up to ten, and optionally combining with fall-through slots to further optimize memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If DFA graphs are used to process single pass regular expressions, then search speed is improved, but memory footprint grows exponentially

Engineering Contradiction:
Improvesearch speedVSAvoidmemory footprint
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The DFA graph is segmented into multiple levels or tiers, where frequently accessed transitions are placed in smaller, faster memory (cache) and less frequently accessed transitions are placed in larger, slower memory. This hierarchical segmentation allows the system to maintain fast search performance for common patterns while reducing the immediate memory footprint by storing only essential transitions in high-speed memory.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different portions of the DFA graph are allocated different quality characteristics based on their access frequency and importance. Hot transitions (frequently executed) are stored in high-speed cache memory with fast access times, while cold transitions (rarely executed) are stored in main memory. This local differentiation of quality allows the system to optimize for speed where it matters most while accepting slower access for less critical transitions, thereby reducing overall memory footprint requirements.

Inventive Principle:
Principle #3Local quality

2Productivity

If DFA graph size is reduced to fit in cache, then processing performance is improved, but the ability to handle complex patterns is reduced

Engineering Contradiction:
Improveprocessing performanceVSAvoidpattern handling capability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system dynamically manages the DFA graph by loading and unloading different portions of the graph into cache memory based on runtime conditions, access patterns, and available memory. This dynamic allocation allows the system to adapt to different pattern matching workloads, loading complex pattern transitions into cache when they are needed while maintaining the ability to handle a wide variety of patterns by swapping graph portions as required.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The DFA graph implementation uses a nested structure where a core set of essential transitions is permanently resident in cache memory, while additional transitions are stored in external memory and loaded into cache as needed. This nested arrangement allows the system to maintain a minimal viable DFA in fast memory while having access to the full DFA graph stored in slower memory, effectively nesting the smaller in-cache graph within the larger overall graph structure.

Inventive Principle:
Principle #7Nested doll (Nesting)

Data Source

PatentUS20260072987A1Range slots for deterministic finite automatons in a regular expression accelerator
Publication Date: 2026.03.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20260072987A1 patent drawing
  • US20260072987A1 patent drawing
  • US20260072987A1 patent drawing

AI summary

Systems and methods for implementing range slots for deterministic finite automatons (DFAs) in a regular expression (regex) accelerator are provided. A method includes compiling a set of regular expression patterns to generate an output file, where the output file comprises information concerning a deterministic finite automaton (DFA) graph, including range information indicative of whether any of a set of transitions along an edge associated with the DFA graph can be captured by a respective single transition. The method further includes during processing of a payload, based on the range information, executing the respective single transition along the edge associated with the DFA graph.