anomalyco / anomalyco/opencode
[FEATURE]: Add ugrep search engine backend for multi-core single-file performance
@rekram1-node is already working on this.
Since Jul 27, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
ripgrep (rg) runs single-threaded when searching individual large files (logs, bundles, datasets) and slows down on PCRE2 lookaround patterns (rg -P).
Solution
Support ugrep as a search backend.
Key Advantages
In my Ubuntu 24.04 ARM64 system:
• 15.7x Faster Single-File Matches: ugrep splits single files across CPU cores via mmap chunking.
• 30.3x Faster Case-Insensitive Search (-i): Hardware SIMD bit-parallel case-folding (ARM NEON / AVX-512).
• 300x Faster PCRE2 Lookarounds (-P): SIMD pre-filtering before PCRE2 JIT execution.
Proposed Action
Add a configurable search binary path (--search-engine=ugrep or UGREP_PATH) with automatic fallback to rg.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.