4 ms·
That feels like it's in about the right ballpark based on my own tests. You can make it go a bit faster if you're using nightly Rust and compile with SIMD optim
by burntsushi 8y ago
That feels like it's in about the right ballpark based on my own tests. You can make it go a bit faster if you're using nightly Rust and compile with SIMD optimizations:
RUSTFLAGS="-C target-cpu=native" cargo build --release --features 'simd-accel avx-accel pcre2'
In particular, this enables SIMD optimizations in the crate ripgrep uses for decoding UTF-8, which is required to run on all files in order to use PCRE2 in Unicode mode.
(Eventually, I'm hoping the SIMD optimizations in the encoding_rs crate move to using runtime detection like the regex crate instead of requiring compile time flags.)
Or alternatively, disable Unicode with `--no-pcre2-unicode` and no transcoding will be done. :-)
- dagenix 8y agoI installed with: PCRE2_SYS_STATIC=1 RUSTFLAGS="-C target-cpu=native" rustup run nightly cargo install ripgrep --force --features 'simd-accel avx-accel pcre2' `--no-pcre2-unicode` sped it up a little. But, it was already quite fast. Great work on ripgrep and thanks for such an amazing tool!