Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kirillbobyrev opened this issue Jul 2, 2024 · 0 comments
Labels
experiment Ideas to try out good first issue Good way to start contributing performance Making the engine fast
Milestone

Comments

@kirillbobyrev
Copy link
Owner

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.

@kirillbobyrev kirillbobyrev added performance Making the engine fast experiment Ideas to try out good first issue Good way to start contributing labels Jul 2, 2024
@kirillbobyrev kirillbobyrev added this to the Stable milestone Jul 2, 2024
@kirillbobyrev kirillbobyrev changed the title Use smallvec or tinyvec instead of ArrayVec Experiment with performance of arrayvec, tinyvec and smallvec Jul 2, 2024
@kirillbobyrev kirillbobyrev changed the title Experiment with performance of arrayvec, tinyvec and smallvec Experiment with performance of arrayvec, tinyvec and smallvec against std::Vec Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experiment Ideas to try out good first issue Good way to start contributing performance Making the engine fast
Projects
None yet
Development

No branches or pull requests

1 participant