Skip to content

Commit 144b276

Browse files
authored
Merge pull request #2106 from nnethercote/add-ripgrep-tiny
Add `ripgrep-14.1.1-tiny` benchmark
2 parents 3279605 + 6a4e05c commit 144b276

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+26728
-0
lines changed

collector/compile-benchmarks/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ compiler in interesting ways.
117117
regression](https://github.com/rust-lang/rust/issues/31157) from the past.
118118
- **ripgrep-13.0.0-tiny**: A line-oriented search tool, optimized with flags that should reduce
119119
binary size.
120+
- **ripgrep-14.1.1-tiny**: A line-oriented search tool, optimized with flags
121+
that should reduce binary size.
120122
- **token-stream-stress**: A proc-macro crate. Constructs a long token stream
121123
much like the `quote` crate does, which caused [quadratic
122124
behavior](https://github.com/rust-lang/rust/issues/65080) in the past.

collector/compile-benchmarks/REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ path = "ripgrep-14.1.1/**"
215215
SPDX-FileCopyrightText = "ripgrep contributors"
216216
SPDX-License-Identifier = "MIT OR Unlicense"
217217

218+
[[annotations]]
219+
path = "ripgrep-14.1.1-tiny/**"
220+
SPDX-FileCopyrightText = "ripgrep contributors"
221+
SPDX-License-Identifier = "MIT OR Unlicense"
222+
218223
[[annotations]]
219224
path = "serde-1.0.136/**"
220225
SPDX-FileCopyrightText = "serde contributors"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
2+
# not depend on the vcruntime DLL.
3+
#
4+
# See: https://github.com/BurntSushi/ripgrep/pull/1613
5+
[target.x86_64-pc-windows-msvc]
6+
rustflags = ["-C", "target-feature=+crt-static"]
7+
[target.i686-pc-windows-msvc]
8+
rustflags = ["-C", "target-feature=+crt-static"]
9+
10+
# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
11+
# the default. But the plan is for the default to change to dynamic linking.
12+
# The whole point of MUSL with respect to ripgrep is to create a fully
13+
# statically linked executable.
14+
#
15+
# See: https://github.com/rust-lang/compiler-team/issues/422
16+
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
17+
[target.x86_64-unknown-linux-musl]
18+
rustflags = [
19+
"-C", "target-feature=+crt-static",
20+
"-C", "link-self-contained=yes",
21+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "4649aa9700619f94cf9c66876e9549d83420e16c"
4+
},
5+
"path_in_vcs": ""
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.*.swp
2+
tags
3+
target
4+
/grep/Cargo.lock
5+
/globset/Cargo.lock
6+
/ignore/Cargo.lock
7+
/termcolor/Cargo.lock
8+
/wincolor/Cargo.lock
9+
/deployment
10+
/.idea
11+
12+
# Snapcraft files
13+
stage
14+
prime
15+
parts
16+
*.snap
17+
*.pyc
18+
ripgrep*_source.tar.bz2
19+
20+
# Cargo timings
21+
cargo-timing-*.html
22+
cargo-timing.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!/.github/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/crates/core/search.rs b/crates/core/search.rs
2+
index 67273425..4794ab49 100644
3+
--- a/crates/core/search.rs
4+
+++ b/crates/core/search.rs
5+
@@ -340,6 +340,7 @@ impl<W: WriteColor> SearchWorker<W> {
6+
fn search_path(&mut self, path: &Path) -> io::Result<SearchResult> {
7+
use self::PatternMatcher::*;
8+
9+
+ println!("testing");
10+
let (searcher, printer) = (&mut self.searcher, &mut self.printer);
11+
match self.matcher {
12+
RustRegex(ref m) => search_path(m, searcher, printer, path),

0 commit comments

Comments
 (0)