Repolode
davidesantangelo

davidesantangelo/krep

A fast, multi-threaded command-line string search tool that is grep-compatible, with SIMD acceleration and regex support.

Open source альтернатива:grep

Звёзды
529
Форки
26
Открытые issues
6
Последний коммит
в прошлом месяце

Что это?

krep is a command-line text search utility written in C, designed as a faster alternative to grep for large-scale pattern matching. It selects among several search algorithms (Boyer-Moore, KMP, Two-Way, Shift-Or, Aho-Corasick) depending on the pattern, and uses SIMD instructions (SSE2, AVX2, AVX-512, NEON) together with memory-mapped I/O to speed up scanning.

The tool supports fixed strings by default, POSIX regular expressions, and multiple patterns supplied via repeated -e flags or a pattern file. It can search files, directories recursively with glob include and exclude rules and .gitignore handling, or standard input. Common grep options such as context lines, line numbers, counts, and file listings are available, along with JSON Lines output for scripting.

krep runs on Linux, macOS, and BSD systems with a C compiler and pthread. Builds can be tuned with PORTABLE or NATIVE make flags to balance portability and CPU-specific vector support.

Ключевые возможности

  • 01Automatically selects among several string search algorithms based on the pattern
  • 02SIMD acceleration and memory-mapped I/O for fast scanning
  • 03Multi-threaded search across CPU cores
  • 04POSIX regex support and multiple pattern search
  • 05Recursive directory search with globs, exclusions, and .gitignore support
  • 06grep-compatible options plus JSON Lines output

Сценарии использования

  • Searching large source trees or log directories for many patterns at once
  • Scripting text searches that need structured JSON Lines output
  • Replacing grep in performance-sensitive build or CI pipelines
  • Quick existence checks in shell scripts using quiet mode

Темы

Частые вопросы

Что такое krep?
A fast, multi-threaded command-line string search tool that is grep-compatible, with SIMD acceleration and regex support. krep is a command-line text search utility written in C, designed as a faster alternative to grep for large-scale pattern matching. It selects among several search algorithms (Boyer-Moore, KMP, Two-Way, Shift-Or, Aho-Corasick) depending on the pattern, and uses SIMD instructions (SSE2, AVX2, AVX-512, NEON) together with memory-mapped I/O to speed up scanning.
krep можно использовать бесплатно? Какая у него лицензия?
krep распространяется с открытым исходным кодом под лицензией BSD-2-Clause. Перед использованием в коммерческих продуктах проверьте условия лицензии.
krep всё ещё поддерживается?
Обновлялся за последние 6 месяцев. Последний коммит в krep — 16 сент. 2026 г..
Для чего можно использовать krep?
Searching large source trees or log directories for many patterns at once Scripting text searches that need structured JSON Lines output Replacing grep in performance-sensitive build or CI pipelines Quick existence checks in shell scripts using quiet mode
Где скачать krep?
Исходный код и инструкции по установке — на GitHub: https://github.com/davidesantangelo/krep

Описание создано ИИ на основе README проекта. Статистика GitHub обновляется ежедневно.

Похожие проекты