Hasty Briefsbeta

Bilingual

Show HN: K(r)ep - A high-performance string search utility

a year ago
  • #command-line-tool
  • #performance
  • #string-search
  • Krep is an optimized string search utility focused on speed and efficiency for large files and directories.
  • It offers multiple search algorithms including Boyer-Moore-Horspool, KMP, and Aho-Corasick, with SIMD acceleration.
  • Features include memory-mapped I/O, multi-threaded search, regex support, and recursive directory search.
  • Krep is not a full replacement for tools like grep or ripgrep but aims for minimalism and high performance.
  • The name 'krep' is inspired by the Icelandic word 'kreppan,' meaning 'to grasp quickly.'
  • Installation is straightforward with `make` and `sudo make install` commands.
  • Performance benchmarks show Krep is significantly faster than grep and slightly faster than ripgrep.
  • Krep uses parallel processing, memory-mapped I/O, and optimized algorithm selection for performance.
  • It automatically skips binary files and common non-code directories during recursive searches.
  • Contributions are welcome under the BSD-2 License.