Open
Description
std::mem::size_of::<Node>() == 160
currently. I think we gain some nice performance (better cache utilization) if we trim it down a bit.
Some suggestions:
- Use
u8
instead ofusize
for input/output indices - Use
u32
forNodeIndex
instead ofu64
- Store
outgoing_edges
on the heap - Pack
ChannelConfig
as a singleArc<(count, mode, interp)>
ChannelConfig is now a single Arc instead of 3 #307 - Use bitflags to combine the boolean fields in a single u8
On a different note, we can explore to store the Nodes as an "struct of arrays" instead of "array (hashmap in our case) of structs" https://news.ycombinator.com/item?id=17981306