Make insert_iterations for interleaved writes more closely match

This commit is contained in:
2024-11-04 14:46:30 -08:00
parent f079d84bda
commit 4494359ca2
+8 -4
View File
@@ -4087,12 +4087,13 @@ void pointIter(Job *job, Context *context) {
MUSTTAIL return complete(job, context);
}
++context->iterations;
if (!job->getChildAndIndex(child, job->remaining.front())) [[unlikely]] {
*job->result = {job->n, job->remaining};
MUSTTAIL return complete(job, context);
}
++context->iterations;
job->continuation = PointIterTable<NodeTTo>::table[job->child.getType()];
__builtin_prefetch(job->child);
MUSTTAIL return keepGoing(job, context);
@@ -4193,11 +4194,12 @@ void prefixIter(Job *job, Context *context) {
}
}
++context->iterations;
if (!job->getChildAndIndex(child, job->remaining.front())) [[unlikely]] {
goto noNodeOnSearchPath;
}
++context->iterations;
job->continuation = PrefixIterTable<NodeTTo>::table[job->child.getType()];
__builtin_prefetch(job->child);
MUSTTAIL return keepGoing(job, context);
@@ -4267,11 +4269,12 @@ void beginIter(Job *job, Context *context) {
goto gotoEndIter;
}
++context->iterations;
if (!job->getChildAndIndex(child, job->begin.front())) [[unlikely]] {
goto gotoEndIter;
}
++context->iterations;
job->continuation = BeginIterTable<NodeTTo>::table[job->child.getType()];
__builtin_prefetch(job->child);
MUSTTAIL return keepGoing(job, context);
@@ -4331,13 +4334,14 @@ void endIter(Job *job, Context *context) {
MUSTTAIL return complete(job, context);
}
++context->iterations;
if (!job->getChildAndIndex(child, job->end.front())) [[unlikely]] {
*job->result = {job->n, job->begin, job->endNode, job->end};
assert(job->endNode != nullptr);
MUSTTAIL return complete(job, context);
}
++context->iterations;
job->continuation = EndIterTable<NodeTTo>::table[job->child.getType()];
__builtin_prefetch(job->child);
MUSTTAIL return keepGoing(job, context);