Skip to content

Always-heap vectors: possible smallvec option [Low Priority] #4

@Ben-PH

Description

@Ben-PH

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions