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

@@ -123,7 +123,7 @@ char roseSuffixInfoIsExhausted(const struct RoseEngine *t,
const u32 *ekeys = (const u32 *)((const char *)t + info->ekeyListOffset);
while (*ekeys != END_EXHAUST) {
DEBUG_PRINTF("check %u\n", *ekeys);
if (!isExhausted(exhausted, *ekeys)) {
if (!isExhausted(t, exhausted, *ekeys)) {
DEBUG_PRINTF("not exhausted -> alive\n");
return 0;
}