why GNU grep is fast

This page summarizes the projects mentioned and recommended in the original post on /r/linux

Our great sponsors
  • Mergify - Tired of breaking your main and manually rebasing outdated pull requests?
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • aho-corasick

    A fast implementation of Aho-Corasick in Rust.

    A less well known and far more complicated SIMD algorithm for multiple substring search.

  • regex

    An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

    Ripgrep makes use of Rust's regex crate, which is highly optimised. So a rewrite of Ripgrep is unlikely to maintain the same speed as the original.

  • Mergify

    Tired of breaking your main and manually rebasing outdated pull requests?. Managing outdated pull requests is time-consuming. Mergify's Merge Queue automates your pull request management & merging. It's fully integrated to GitHub & coordinated with any CI. Start focusing on code. Try Mergify for free.

  • rust-memchr

    Optimized string search routines for Rust.

    I'm not sure either myself. GNU libc does use SIMD, but the ones I'm aware of are all written in Assembly, like memchr. ripgrep also uses memchr, but not from libc, since the quality of memchr implementations is very hit or miss. GNU libc's is obviously very good, but things can be quite a bit slower in most other libcs (talking orders of magnitude here). Instead, I wrote my own memchr in Rust: https://github.com/BurntSushi/memchr/blob/8037d11b4357b0f07be2bb66dc2659d9cf28ad32/src/memchr/x86/avx.rs

  • gccrs

    GCC Front-End for Rust

    If it were proposed, it may end up being a political issue. GNU wants things under their umbrella to be GNU GPL licensed, and the rust compiler is not. There is work to get a Rust compiler built into gcc, but it's not nearly ready yet.

  • fd

    A simple, fast and user-friendly alternative to 'find'

    For things that are commonly and almost-ideally represented as text files, there’s a lot of Rust based alternatives are faster and have more features than the old unix/GNU tools: ripgrep, fd, cw, and you can find more in this list.

  • nushell

    A new type of shell

    For lightly structured data, nushell (still pre-release) or jq/jaq are better.

  • cw

    A Rust wc clone (by Freaky)

    For things that are commonly and almost-ideally represented as text files, there’s a lot of Rust based alternatives are faster and have more features than the old unix/GNU tools: ripgrep, fd, cw, and you can find more in this list.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • jaq

    A jq clone focussed on correctness, speed, and simplicity

    For lightly structured data, nushell (still pre-release) or jq/jaq are better.

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