https://github.com/rifflabs/citadel/blob/559a632975f17b4636f45d17921ea9909a8f85db/crates/citadel-consensus/src/convergence.rs#L75-L82
Linked code has vectors in the struct. Premature optimisation is the root of all evil. In defiance of this statement, if these fields are stack-allocated friendly, there are crates which start the vector as a relatively small stack alocation, and in the event it outgrows said allocation, it uses the heap to set the difference.
This is highly useage sensitive, so would require benchmarks, sanity checking that it's worth putting attention to, etc.
This issue is raised to present outside contributors with something interesting to peck away at, new core contributors to have an excuse to build profiling/benchmarks, etc.
https://github.com/rifflabs/citadel/blob/559a632975f17b4636f45d17921ea9909a8f85db/crates/citadel-consensus/src/convergence.rs#L75-L82
Linked code has vectors in the struct. Premature optimisation is the root of all evil. In defiance of this statement, if these fields are stack-allocated friendly, there are crates which start the vector as a relatively small stack alocation, and in the event it outgrows said allocation, it uses the heap to set the difference.
This is highly useage sensitive, so would require benchmarks, sanity checking that it's worth putting attention to, etc.
This issue is raised to present outside contributors with something interesting to peck away at, new core contributors to have an excuse to build profiling/benchmarks, etc.