Krep
lastmod 2025-03-13created 2025-03-132 edits
A string search tool 5x faster than grep
Features
- An ultra-fast string search tool written in C for performance-critical applications
- Dynamically selects the optimal algorithm based on pattern characteristics and hardware
- Leverages hardware such as SSE4.2/AVX2 to deliver maximum throughput
- Splits files into chunks for multithreaded parallel processing to handle large files
- Uses the most suitable search algorithm for each pattern
- Boyer-Moore-Horspool: suited for general pattern matching
- Knuth-Morris-Pratt (KMP) algorithm: optimized for short patterns
- Rabin-Karp: effective for long patterns
- SIMD acceleration: improved performance on hardware supporting SSE4.2 and AVX2
- Case-sensitive and case-insensitive search
- Can search strings directly in addition to files
- Provides a mode that outputs only the match count