Skip to content

Commit 6a468fd

Browse files
connortsui20claude
andcommitted
Restore the like_per_row_patterns input
Progress towards #9128. `like_per_row_patterns` kept its name but changed its pattern from `hello%` to `%aaa%` so it could pair with `like_per_row_distinct_patterns`. CodSpeed matches benchmarks by name, so it compared a prefix match against a substring search and reported a 24% regression in a function this branch never touched. The pattern goes back to `hello%`, and `%aaa%` moves to `like_per_row_repeated_patterns`. The pair is preserved, both halves of it are new names with no history to invalidate, and `like_per_row_patterns` measures on this branch what it measures on develop. Signed-off-by: Connor Tsui <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent 0e5c19c commit 6a468fd

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎vortex-array/benches/like.rs‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,24 @@ fn bench_per_row_patterns(bencher: Bencher, patterns: ArrayRef) {
109109
fn like_per_row_patterns(bencher: Bencher) {
110110
// A non-constant pattern child takes the per-row path; repeated patterns hit the
111111
// compile cache.
112+
let patterns = VarBinViewArray::from_iter_str((0..ARRAY_SIZE).map(|_| "hello%")).into_array();
113+
bench_per_row_patterns(bencher, patterns);
114+
}
115+
116+
/// The per-row path with the compile cache hit on every row, carrying the infix pattern that
117+
/// [`like_per_row_distinct_patterns`] varies. Both compile the same shape and match the same way,
118+
/// so the only difference between them is how often a pattern is compiled.
119+
#[divan::bench]
120+
fn like_per_row_repeated_patterns(bencher: Bencher) {
112121
let patterns = VarBinViewArray::from_iter_str((0..ARRAY_SIZE).map(|_| "%aaa%")).into_array();
113122
bench_per_row_patterns(bencher, patterns);
114123
}
115124

116125
/// The per-row path with the compile cache defeated: every row carries a distinct pattern of the
117126
/// same shape, so each row pays one [`LikePattern`] compilation.
118127
///
119-
/// Paired with [`like_per_row_patterns`] this isolates the cost of compiling a pattern from the cost
120-
/// of matching against it, which is what any kernel that cannot cache across rows would pay.
128+
/// Paired with [`like_per_row_repeated_patterns`] this isolates the cost of compiling a pattern from
129+
/// the cost of matching against it, which is what any kernel that cannot cache across rows pays.
121130
#[divan::bench]
122131
fn like_per_row_distinct_patterns(bencher: Bencher) {
123132
let patterns = VarBinViewArray::from_iter_str(

0 commit comments

Comments
 (0)