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

Faster insert for the index == len case #282

Merged
merged 2 commits into from Jun 24, 2022

Commits on Jun 23, 2022

  1. Optimize insert for the case where index == len.

    By skipping the call to `copy` with a zero length. This makes it closer
    to `push`. This speeds up rustc (which uses `SmallVec` extensively) by
    2% on one benchmark.
    
    Also clarify the panic condition.
    nnethercote committed Jun 23, 2022
    Copy the full SHA
    016e71d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0a6c208 View commit details
    Browse the repository at this point in the history