Expand description
Variables: the small ordered map of named values a node produces and a
pool namespace holds.
A node’s outputs become its namespace in the variable pool and travel in its
Event::NodeSucceeded unchanged:
Variables is a reference-counted handle, so storing the outputs, emitting
them and taking pool snapshots share one allocation instead of copying the
map. Writes copy the entries only while they are shared (copy-on-write).
Nodes produce a handful of variables, so entries are kept in insertion order
in a flat vector (the first few stored inline in the shared allocation) and
looked up by a linear scan, which beats hashing at these sizes. Names are
VarNames, which hold a &'static str without allocating.