Work

The Diodic Search Architecture: Regex Search without Per-File Metadata Cost

Year: 2026
Type: preprint
Abstract: We present a prepared-corpus regex search system that reduces repeated-query latency by amortizing per-file filesystem metadata costs into a one-time packing and indexing phase. A SIMD candidate filter reduces exact-match work but introduces no false negatives. On stable corpora with many small files the system achieves substantial end-to-end speedups — 2.79–3.38× over ripgrep 15 on a fixed 20,000-file corpus and 6.66–12.41× on a live 95,942-file, 1.94 GB registry across the patterns whose result sets coincide, breaking even at Q* ≈ 24 queries — and the advantage diminishes for one-shot searches or frequently changing corpora. An in-process timer reports a phantom 53.9% win for a leaked unmap that the external wall clock refuses, and every end-to-end performance claim in this paper rests on external wall-clock measurements; the in-process timings are reported separately as diagnostics, for the segments they explain and nothing more. Count parity holds on every comparison reported here except the two live-registry patterns marked † in Table 11, where the store returned a strict subset of the direct engine’s answer; no ratio is claimed for them, and both endpoints of the registry range come from coinciding patterns. Even there the store arm of that snapshot did not extract container text, so the range is a property of that historical configuration — the missing work could have lowered the store’s cost without changing its answer — and this paper reports no full-pipeline registry measurement. The Tesla valve serves as an architectural inspiration for asymmetric cost, not as a physical model or performance explanation. Preprint — not peer reviewed; comments welcome. Manuscript dated October 18, 2026. Source code: https://github.com/danalec/rgx
Language: English
Open Access status: green
OpenAlex ID: W7222869787
Cites:
Cited by:
Related to: