mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
Rose: allow block-mode merge of small prefixes
Previously, we disallowed the merging of all Rose prefixes in block mode where the literal sets are not identical. This change allows merging if the prefix graphs to be merged are very small, as a small performance improvement for cases with lots of tiny prefixes. This check is deliberately conservative: graphs must have some common vertices, and the result of the merge must not give up any accelerability.
This commit is contained in:
committed by
Matthew Barr
parent
670eff5bc0
commit
7b54856642
@@ -2187,7 +2187,7 @@ u32 countAccelStates(NGHolder &h,
|
||||
|
||||
if (!cc.grey.allowLimExNFA) {
|
||||
DEBUG_PRINTF("limex not allowed\n");
|
||||
return NFA_MAX_ACCEL_STATES + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sanity check the input data.
|
||||
@@ -2201,11 +2201,11 @@ u32 countAccelStates(NGHolder &h,
|
||||
do_accel, state_compression, cc, num_states);
|
||||
|
||||
// Acceleration analysis.
|
||||
fillAccelInfo(bi);
|
||||
nfaFindAccelSchemes(bi.h, bi.br_cyclic, &bi.accel.accel_map);
|
||||
|
||||
u32 num_accel = verify_u32(bi.accel.accelerable.size());
|
||||
u32 num_accel = verify_u32(bi.accel.accel_map.size());
|
||||
DEBUG_PRINTF("found %u accel states\n", num_accel);
|
||||
return min(num_accel, (u32)NFA_MAX_ACCEL_STATES);
|
||||
return num_accel;
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
Reference in New Issue
Block a user