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

Make RawVec::grow mostly non-generic. #72013

Merged

Commits on May 11, 2020

  1. Remove RawVec::double_in_place.

    It's unused.
    nnethercote committed May 11, 2020
    Configuration menu
    Copy the full SHA
    a3cc435 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2020

  1. Remove RawVec::double.

    It's only used once, for `VecDeque`, and can easily be replaced by
    something else. The commit changes `grow_if_necessary` to `grow` to
    avoid some small regressions caused by changed inlining.
    
    The commit also removes `Strategy::Double`, and streamlines the
    remaining variants of `Strategy`.
    
    It's a compile time win on some benchmarks because the many
    instantations of `RawVec::grow` are a little smaller.
    nnethercote committed May 12, 2020
    Configuration menu
    Copy the full SHA
    f420726 View commit details
    Browse the repository at this point in the history
  2. Split RawVec::grow up.

    The amortized case is much more common than the exact case, and it is
    typically instantiated many times.
    
    Also, we can put a chunk of the code into a function that isn't generic
    over T, which reduces the amount of LLVM IR generated quite a lot,
    improving compile times.
    nnethercote committed May 12, 2020
    Configuration menu
    Copy the full SHA
    68b7503 View commit details
    Browse the repository at this point in the history