Explain purpose for prefetches in getFirstChild

This commit is contained in:
2024-11-15 16:29:42 -08:00
parent 3a34d3cecb
commit 661ffcd843

View File

@@ -1406,10 +1406,12 @@ TaggedNodePointer getChildGeq(Node *self, int child) {
TaggedNodePointer getFirstChild(Node0 *) { return nullptr; }
TaggedNodePointer getFirstChild(Node3 *self) {
// Improves scan performance
__builtin_prefetch(self->children[1]);
return self->children[0];
}
TaggedNodePointer getFirstChild(Node16 *self) {
// Improves scan performance
__builtin_prefetch(self->children[1]);
return self->children[0];
}