Skip to main content

Module pool

Module pool 

Source
Expand description

Reused scratch buffers: the walkers and the traversals use a stack of node ids that is taken from a thread local pool and returned when it is dropped, instead of allocating a stack for each traversal (the typescript port shares a single stack for the same reason, see visitStack in src/ast/arena.ts).

Structsยง

PooledVec
a Vec<u32> taken from the pool, returned to the pool when it is dropped