Skip to content

Experiment with performance of arrayvec, tinyvec and smallvec against std::Vec #241

Description

@kirillbobyrev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions