mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 18:20:35 +03:00
Use fatbit for anch log, delay slots in scratch
Since these structures are in scratch, they do not have to be as small as possible and we can use fatbit instead of multibit to improve performance.
This commit is contained in:
committed by
Matthew Barr
parent
1c2fca8840
commit
de61b32e98
@@ -105,13 +105,13 @@ void nextAnchoredMatch(const struct RoseEngine *t, struct RoseContext *tctxt,
|
||||
assert(tctxt->curr_anchored_loc != MMB_INVALID);
|
||||
|
||||
struct hs_scratch *scratch = tctxtToScratch(tctxt);
|
||||
u8 **anchoredRows = getAnchoredLog(scratch);
|
||||
struct fatbit **anchoredRows = getAnchoredLog(scratch);
|
||||
|
||||
u32 region_width = t->anchoredMatches;
|
||||
u8 *curr_row = anchoredRows[tctxt->curr_anchored_loc];
|
||||
struct fatbit *curr_row = anchoredRows[tctxt->curr_anchored_loc];
|
||||
|
||||
tctxt->curr_row_offset = mmbit_iterate(curr_row, region_width,
|
||||
tctxt->curr_row_offset);
|
||||
tctxt->curr_row_offset = fatbit_iterate(curr_row, region_width,
|
||||
tctxt->curr_row_offset);
|
||||
DEBUG_PRINTF("next %u [idx = %u] @%llu\n", *reportId,
|
||||
tctxt->curr_row_offset, *end);
|
||||
if (tctxt->curr_row_offset != MMB_INVALID) {
|
||||
@@ -132,8 +132,8 @@ void nextAnchoredMatch(const struct RoseEngine *t, struct RoseContext *tctxt,
|
||||
assert(tctxt->curr_anchored_loc < scratch->anchored_region_len);
|
||||
curr_row = anchoredRows[tctxt->curr_anchored_loc];
|
||||
|
||||
tctxt->curr_row_offset = mmbit_iterate(curr_row, region_width,
|
||||
MMB_INVALID);
|
||||
tctxt->curr_row_offset = fatbit_iterate(curr_row, region_width,
|
||||
MMB_INVALID);
|
||||
assert(tctxt->curr_row_offset != MMB_INVALID);
|
||||
|
||||
*end = tctxt->curr_anchored_loc + t->maxSafeAnchoredDROffset + 1;
|
||||
|
||||
Reference in New Issue
Block a user