Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • No. Cargo does. The `build.rs` is basically a Cargo hook that gets compiled as a Rust program and executed just before the ripgrep binary is compiled. It lets you do things like set linker flags[1] so that you can embed an XML manifest into the binary on Windows to enable "long path support."

    ripgrep's build.rs used to do more, like build shell completions and the man page. But that's now part of ripgrep proper. e.g., `rg --generate man` writes roff to stdout.

    [1]: https://github.com/BurntSushi/ripgrep/blob/2a4dba3fbfef944c5...

    [2]: https://github.com/BurntSushi/ripgrep/blob/2a4dba3fbfef944c5...

  • aho-corasick

    A fast implementation of Aho-Corasick in Rust.

  • Oh I see. Yes, that's what is commonly used in academic publications. But I've yet to see it used in the wild.

    I mentioned exactly that paper (I believe) in my write-up on Teddy: https://github.com/BurntSushi/aho-corasick/tree/master/src/p...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ugrep

    NEW ugrep 5.1: an ultra fast, user-friendly, compatible grep. Ugrep combines the best features of other grep, adds new features, and searches fast. Includes a TUI and adds Google-like search, fuzzy search, hexdumps, searches nested archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more

  • I switched from from ripgrep to ugrep and never looked back. It's just as fast, but also comes with fuzzy matching (which is super useful), a TUI (useful for code reviews), and can also search in PDFs, archives, etc.

    The optional Google search syntax also very convenient.

    https://ugrep.com

  • mpv

    🎥 Command line video player

  • Author of ripgrep here.

    Like automatic encoding detection and transparently searching UTF-16?

    Or simple ways for composing character classes, e.g., `[\pL&&\p{Greek}]` for all codepoints in the Greek script that are letters. Another favorite of mine is `\P{ascii}`, which will search for any codepoint that isn't in the ASCII subset.

    Or more sophisticated filtering features that let you automatically respect things like gitignore rules.

    Those are all things that ripgrep does that grep does not. So I do not favor this explanation personally.

    ripgrep has just about all of the functionality that GNU grep does. I would say the two biggest missing pieces at this point are:

    * POSIX locale support. (But this might be a feature[1].)

    * Support for "basic" regexes or some equivalent that flips the escaping rules around. i.e., You need to write `\+` to match 1 or more things, where as `+` will just match `+ literally.

    Otherwise, ripgrep has unfortunately grown just about as many flags as GNU grep.

    [1]: https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...

  • ripgrep-all

    rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.

  • I searched in portage, and it seems there is another version working also with other documents like PDFs and doc.

    https://github.com/phiresky/ripgrep-all

  • ngp2

    ncurses-grep: interactively navigate grep-like results

  • Semi off-topic, I've coded a frontend to navigate and filter grep-like results which might be of interest to some of you: https://github.com/gquere/ngp2

  • nushell

    A new type of shell

  • Maybe if the "popular" shells, but http://www.nushell.sh/ is looking better and better

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • deadgrep

    fast, friendly searching with ripgrep and Emacs

  • Deadgrep (uses ripgrep and evil-collection has a binding) takes me to my happy place -

    https://github.com/Wilfred/deadgrep

  • fzf.vim

    fzf :heart: vim

  • https://github.com/junegunn/fzf.vim

    And added my keyboard shortcuts.

  • cs

    command line codespelunker or code search

  • That’s one of the reasons I made this actually https://github.com/boyter/cs

    I wanted and boolean syntax mixed with fzf instant search. It’s not as fast as ripgrep of course but it’s not solving the same problem.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts