Skip to content

Add ripgrep-14.1.1-tiny benchmark #2106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions collector/compile-benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ compiler in interesting ways.
regression](https://github.com/rust-lang/rust/issues/31157) from the past.
- **ripgrep-13.0.0-tiny**: A line-oriented search tool, optimized with flags that should reduce
binary size.
- **ripgrep-14.1.1-tiny**: A line-oriented search tool, optimized with flags
that should reduce binary size.
- **token-stream-stress**: A proc-macro crate. Constructs a long token stream
much like the `quote` crate does, which caused [quadratic
behavior](https://github.com/rust-lang/rust/issues/65080) in the past.
Expand Down
5 changes: 5 additions & 0 deletions collector/compile-benchmarks/REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ path = "ripgrep-14.1.1/**"
SPDX-FileCopyrightText = "ripgrep contributors"
SPDX-License-Identifier = "MIT OR Unlicense"

[[annotations]]
path = "ripgrep-14.1.1-tiny/**"
SPDX-FileCopyrightText = "ripgrep contributors"
SPDX-License-Identifier = "MIT OR Unlicense"

[[annotations]]
path = "serde-1.0.136/**"
SPDX-FileCopyrightText = "serde contributors"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
# not depend on the vcruntime DLL.
#
# See: https://github.com/BurntSushi/ripgrep/pull/1613
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
# the default. But the plan is for the default to change to dynamic linking.
# The whole point of MUSL with respect to ripgrep is to create a fully
# statically linked executable.
#
# See: https://github.com/rust-lang/compiler-team/issues/422
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
[target.x86_64-unknown-linux-musl]
rustflags = [
"-C", "target-feature=+crt-static",
"-C", "link-self-contained=yes",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git": {
"sha1": "4649aa9700619f94cf9c66876e9549d83420e16c"
},
"path_in_vcs": ""
}
22 changes: 22 additions & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1-tiny/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.*.swp
tags
target
/grep/Cargo.lock
/globset/Cargo.lock
/ignore/Cargo.lock
/termcolor/Cargo.lock
/wincolor/Cargo.lock
/deployment
/.idea

# Snapcraft files
stage
prime
parts
*.snap
*.pyc
ripgrep*_source.tar.bz2

# Cargo timings
cargo-timing-*.html
cargo-timing.html
1 change: 1 addition & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1-tiny/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/.github/
12 changes: 12 additions & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1-tiny/0-println.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/crates/core/search.rs b/crates/core/search.rs
index 67273425..4794ab49 100644
--- a/crates/core/search.rs
+++ b/crates/core/search.rs
@@ -340,6 +340,7 @@ impl<W: WriteColor> SearchWorker<W> {
fn search_path(&mut self, path: &Path) -> io::Result<SearchResult> {
use self::PatternMatcher::*;

+ println!("testing");
let (searcher, printer) = (&mut self.searcher, &mut self.printer);
match self.matcher {
RustRegex(ref m) => search_path(m, searcher, printer, path),
Loading
Loading