ArrayVec is pretty fast and gives a solid performance gain (though unclear how much before the engine is more or less complete).
However, it requires setting a maximum threshold for the capacity, which means that it doesn't optimize for the average case. smallvec and tinyvec crates can help with that.
The proposed experiment is to run 4 versions of the engine:
- Fully replace all current
ArrayVec instances with Rust's std::Vec (base)
- Use
ArrayVec as much as possible (closest to the current setup, likely to be optimal)
- Replace all
ArrayVec usages with smallvec and also replace std::Vec whenever possible
- Same as above, but with
tinyvec
It should be unblocked whenever engine reaches Proof of Concept milestone.
ArrayVecis pretty fast and gives a solid performance gain (though unclear how much before the engine is more or less complete).However, it requires setting a maximum threshold for the capacity, which means that it doesn't optimize for the average case.
smallvecandtinyveccrates can help with that.The proposed experiment is to run 4 versions of the engine:
ArrayVecinstances with Rust'sstd::Vec(base)ArrayVecas much as possible (closest to the current setup, likely to be optimal)ArrayVecusages withsmallvecand also replacestd::Vecwhenever possibletinyvecIt should be unblocked whenever engine reaches Proof of Concept milestone.