mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 00:02:24 +03:00
rose: Extend the interpreter to handle more work
- Use program for EOD sparse iterator - Use program for literal sparse iterator - Eliminate RoseRole, RosePred, RoseVertexProps::role - Small performance optimizations
This commit is contained in:
committed by
Matthew Barr
parent
9cb2233589
commit
d67c7583ea
@@ -90,7 +90,7 @@ hs_error_t alloc_scratch(const hs_scratch_t *proto, hs_scratch_t **scratch) {
|
||||
+ bStateSize + tStateSize
|
||||
+ fullStateSize + 63 /* cacheline padding */
|
||||
+ nfa_context_size
|
||||
+ fatbit_size(proto->roleCount) /* handled roles */
|
||||
+ fatbit_size(proto->handledKeyCount) /* handled roles */
|
||||
+ fatbit_size(queueCount) /* active queue array */
|
||||
+ 2 * fatbit_size(deduperCount) /* need odd and even logs */
|
||||
+ 2 * fatbit_size(deduperCount) /* ditto som logs */
|
||||
@@ -192,7 +192,7 @@ hs_error_t alloc_scratch(const hs_scratch_t *proto, hs_scratch_t **scratch) {
|
||||
current += fatbit_size(queueCount);
|
||||
|
||||
s->handled_roles = (struct fatbit *)current;
|
||||
current += fatbit_size(proto->roleCount);
|
||||
current += fatbit_size(proto->handledKeyCount);
|
||||
|
||||
s->deduper.log[0] = (struct fatbit *)current;
|
||||
current += fatbit_size(deduperCount);
|
||||
@@ -312,9 +312,9 @@ hs_error_t hs_alloc_scratch(const hs_database_t *db, hs_scratch_t **scratch) {
|
||||
proto->delay_count = rose->delay_count;
|
||||
}
|
||||
|
||||
if (rose->roleCount > proto->roleCount) {
|
||||
if (rose->handledKeyCount > proto->handledKeyCount) {
|
||||
resize = 1;
|
||||
proto->roleCount = rose->roleCount;
|
||||
proto->handledKeyCount = rose->handledKeyCount;
|
||||
}
|
||||
|
||||
if (rose->tStateSize > proto->tStateSize) {
|
||||
|
Reference in New Issue
Block a user