Skip to content

Commit 148104d

Browse files
authored
Merge pull request #2109 from Kobzol/add-regex-automata-0.4.8
Add `regex-automata-0.4.8` benchmark
2 parents 144b276 + ef4a786 commit 148104d

File tree

129 files changed

+67995
-0
lines changed

Some content is hidden

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

129 files changed

+67995
-0
lines changed

collector/compile-benchmarks/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ They mostly consist of real-world crates.
4444
- **nalgebra-0.33.0**: A linear algebra library. It exercises the new trait solver
4545
in different ways than the old solver.
4646
- **regex-1.5.5**: A regular expression parser. Used by many Rust programs.
47+
- **regex-automata-0.4.8**: A regular expression matching engine. Used by `regex`, which is used by
48+
many Rust programs.
4749
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility, and a
4850
binary crate.
4951
- **ripgrep-14.1.1**: A line-oriented search tool. A widely-used utility, and a

collector/compile-benchmarks/REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ path = "regex-1.5.5/**"
195195
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
196196
SPDX-License-Identifier = "MIT OR Apache-2.0"
197197

198+
[[annotations]]
199+
path = "regex-automata-0.4.8/**"
200+
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
201+
SPDX-License-Identifier = "MIT OR Apache-2.0"
202+
198203
[[annotations]]
199204
path = "regression-31157/**"
200205
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "58e16f50f07729bf856570d1a8be0de0b4d5e9e0"
4+
},
5+
"path_in_vcs": "regex-automata"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/dfa/accel.rs b/src/dfa/accel.rs
2+
index c0ba18ea..009d534b 100644
3+
--- a/src/dfa/accel.rs
4+
+++ b/src/dfa/accel.rs
5+
@@ -186,6 +186,7 @@ impl<'a> Accels<&'a [AccelTy]> {
6+
pub fn from_bytes_unchecked(
7+
mut slice: &'a [u8],
8+
) -> Result<(Accels<&'a [AccelTy]>, usize), DeserializeError> {
9+
+ std::println!("testing");
10+
let slice_start = slice.as_ptr().as_usize();
11+
12+
let (accel_len, _) =
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/src/nfa/thompson/builder.rs b/src/nfa/thompson/builder.rs
2+
index 6b69e878..24564db9 100644
3+
--- a/src/nfa/thompson/builder.rs
4+
+++ b/src/nfa/thompson/builder.rs
5+
@@ -55,10 +55,10 @@ enum State {
6+
/// that `Sparse` is used for via `Union`. But this creates a more bloated
7+
/// NFA with more epsilon transitions than is necessary in the special case
8+
/// of character classes.
9+
- Sparse { transitions: Vec<Transition> },
10+
+ Look { look: Look, next: StateID },
11+
/// A conditional epsilon transition satisfied via some sort of
12+
/// look-around.
13+
- Look { look: Look, next: StateID },
14+
+ Sparse { transitions: Vec<Transition> },
15+
/// An empty state that records the start of a capture location. This is an
16+
/// unconditional epsilon transition like `Empty`, except it can be used to
17+
/// record position information for a capture group when using the NFA for
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/util/alphabet.rs b/src/util/alphabet.rs
2+
index e0e4d2fc..de443a1f 100644
3+
--- a/src/util/alphabet.rs
4+
+++ b/src/util/alphabet.rs
5+
@@ -798,7 +798,7 @@ impl ByteSet {
6+
/// Return true if and only if this set is empty.
7+
#[cfg_attr(feature = "perf-inline", inline(always))]
8+
pub(crate) fn is_empty(&self) -> bool {
9+
- self.bits.0 == [0, 0]
10+
+ self.bits.0 == [0, 1]
11+
}
12+
13+
/// Deserializes a byte set from the given slice. If the slice is of
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/meta/limited.rs b/src/meta/limited.rs
2+
index 5653adc9..b6b9d379 100644
3+
--- a/src/meta/limited.rs
4+
+++ b/src/meta/limited.rs
5+
@@ -49,6 +49,8 @@ pub(crate) fn dfa_try_search_half_rev(
6+
) -> Result<Option<HalfMatch>, RetryError> {
7+
use crate::dfa::Automaton;
8+
9+
+ {}
10+
+
11+
let mut mat = None;
12+
let mut sid = dfa.start_state_reverse(input)?;
13+
if input.start() == input.end() {

0 commit comments

Comments
 (0)