summaryrefslogtreecommitdiff
path: root/examples/dtail.json.example
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-02 18:55:31 +0300
committerPaul Buetow <paul@buetow.org>2025-07-02 18:55:31 +0300
commitdf62b7587929fd4cee5ab22c52a0e9b6035b821e (patch)
treede320c53f0c01a04af3521d835ffa534e0e8b6b9 /examples/dtail.json.example
parente74957dd14d0b1d996ae7b67f000f2bb6296c6a7 (diff)
perf: optimize grep for simple string matching
Add literal string detection to bypass regex compilation for patterns without metacharacters. This provides ~4x performance improvement for common grep patterns like "ERROR" or "WARNING". - Detect literal patterns (no regex metacharacters) at compile time - Use bytes.Contains/strings.Contains for literal matching - Maintain full backward compatibility and serialization format - Add comprehensive tests and benchmarks Benchmark results show: - Literal matching: 107.4 ns/op (optimized) - Regex matching: 439.2 ns/op (original) - Direct bytes.Contains: 88.51 ns/op (baseline) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'examples/dtail.json.example')
0 files changed, 0 insertions, 0 deletions