mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-19 10:34:25 +03:00
allow streams to marked as exhausted in more cases
At stream boundaries, we can mark streams as exhausted if there are no groups active and there are no other ways to report matches. This allows us to stop maintaining the history buffer on subsequent stream writes. Previously, streams were only marked as exhausted if a pure highlander case reported all patterns or the outfix in a sole outfix case died.
This commit is contained in:
@@ -1236,11 +1236,15 @@ void buildRoseSquashMasks(RoseBuildImpl &tbi) {
|
||||
}
|
||||
}
|
||||
|
||||
rose_group unsquashable = 0;
|
||||
rose_group unsquashable = tbi.boundary_group_mask;
|
||||
|
||||
for (u32 lit_id : lit_ids) {
|
||||
const rose_literal_info &info = tbi.literal_info[lit_id];
|
||||
if (info.vertices.size() > 1 || !info.delayed_ids.empty()) {
|
||||
if (!info.delayed_ids.empty()
|
||||
|| !all_of_in(info.vertices,
|
||||
[&](RoseVertex v) {
|
||||
return left == tbi.g[v].left; })) {
|
||||
DEBUG_PRINTF("group %llu is unsquashable\n", info.group_mask);
|
||||
unsquashable |= info.group_mask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user