Skip to content

Low performance on whitespace-delimited data #3167

Description

@LarsHadidi

Ripgrep demonstrates performance comparable to that of ugrep, but when applied to whitespace-delimited data such as MPS files, its performance appears to be several times slower.

Steps to reproduce:

  1. Build ugrep from source:
    ./build.sh
  2. Build ripgrep from source:
    RUSTFLAGS="-Ctarget-cpu=native" cargo build --release --features 'pcre2'
  3. Download and extract textfile:
    https://miplib.zib.de/WebData/instances/hawaiiv10-130.mps.gz
  4. Benchmark ugrep:
    hyperfine 'ug --mmap -n -P \'^\w+$\' hawaiiv10-130.mps > out'
  5. Benchmark ripgrep:
    hyperfine 'rg --mmap -n \'^\w+$\' hawaiiv10-130.mps > out'

My results:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixA feature or bug that is unlikely to be implemented or fixed.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions