Rose: use a multibit for the exhaustion vector

Previously, the exhaustion vector was a standard bitvector, which
required an expensive memset() call at init for databases with a large
number of exhaustion keys.
This commit is contained in:
Justin Viiret
2016-04-04 16:04:28 +10:00
committed by Matthew Barr
parent 1fcd3cfb2c
commit f2c0a66b6f
5 changed files with 27 additions and 44 deletions

View File

@@ -1146,7 +1146,7 @@ hwlmcb_rv_t roseRunProgram(const struct RoseEngine *t,
assert(ri->ekey != INVALID_EKEY);
assert(ri->ekey < t->ekeyCount);
const char *evec = scratch->core_info.exhaustionVector;
if (isExhausted(evec, ri->ekey)) {
if (isExhausted(t, evec, ri->ekey)) {
DEBUG_PRINTF("ekey %u already set, match is exhausted\n",
ri->ekey);
assert(ri->fail_jump); // must progress