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

Try to guess a smarter initial capacity in Vec::from_iter #53086

Closed
wants to merge 2 commits into from

Commits on Aug 8, 2018

  1. Configuration menu
    Copy the full SHA
    d545902 View commit details
    Browse the repository at this point in the history
  2. Be much less clever about things

    This one only helps lower>0, but by doing so means it's always strictly less than 100% overhead, same as the normal doubling algorithm.  And thus doesn't need to do the try_reserve dance or a post-extend cleanup.
    scottmcm committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    aa080f4 View commit details
    Browse the repository at this point in the history