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

Use SmallVec<[T; 1]> where appropriate #60

Open
kazimuth opened this issue Jan 7, 2018 · 0 comments
Open

Use SmallVec<[T; 1]> where appropriate #60

kazimuth opened this issue Jan 7, 2018 · 0 comments

Comments

@kazimuth
Copy link
Contributor

kazimuth commented Jan 7, 2018

This is a minor perf thing:

SmallVec<[T;N]> is a type that stores can store up to N values inline before spilling to the heap, but otherwise behaves exactly the same as Vec. We should use SmallVec in types that there will be many copies of, for example Unit, to avoid extra heap allocations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant