next.js
6a22c484 - turbo-tasks: store CachedTaskType and its argument in one allocation

Commit
21 days ago
turbo-tasks: store CachedTaskType and its argument in one allocation A task type was an Arc<CachedTaskType> pointing at a separately boxed argument. Store the argument inline after the header instead, behind a one-word CachedTaskTypeArc that keeps the argument's vtable in the header. Task cache lookups compare against the stored argument without a second pointer chase, and creating a task allocates once: on a miss the stack-resident argument is moved straight into the allocation.
Author
Committer
Parents
Loading