Skip to content

Commit 9d278dc

Browse files
committed
fixup
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent f1c6a02 commit 9d278dc

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

encodings/fsst/src/dfa/flat_contains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//! Uses an escape-sentinel strategy: the FSST escape code maps to a sentinel
77
//! state, and the next literal byte is looked up in a separate byte-level
88
//! transition table.
9+
//! This is to support needles up to u8::MAX long.
910
//!
1011
//! ## Construction (needle = `"aba"`, symbols = `[0:"ab", 1:"ba"]`)
1112
//!
@@ -122,7 +123,6 @@ impl FlatContainsDfa {
122123
})
123124
}
124125

125-
#[inline(never)]
126126
pub(crate) fn matches(&self, codes: &[u8]) -> bool {
127127
let mut state = 0u8;
128128
let mut pos = 0;

encodings/fsst/src/dfa/prefix.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! TODO(joe): for short prefixes (≤13 bytes), a shift-packed `[u64; 256]`
1010
//! representation would be simpler and easier to read — all state transitions
1111
//! for one input byte fit in a single `u64`. Benchmarks showed no meaningful
12-
//! perf difference (see `benches/BENCH_RESULTS.md`), so we use flat-only for
12+
//! perf difference, so we use flat-only for
1313
//! now to keep the code simple and support long prefixes.
1414
1515
use fsst::Symbol;
@@ -97,7 +97,6 @@ impl FlatPrefixDfa {
9797
})
9898
}
9999

100-
#[inline]
101100
pub(crate) fn matches(&self, codes: &[u8]) -> bool {
102101
let mut state = 0u8;
103102
let mut pos = 0;

0 commit comments

Comments
 (0)