Uh oh!
There was an error while loading. Please reload this page.
Remove OneVector type alias - #53824
Conversation
rust-highfive
commented
Aug 30, 2018
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
commented
Aug 31, 2018
☔ The latest upstream changes (presumably #53832) made this pull request unmergeable. Please resolve the merge conflicts. |
llogiq
commented
Aug 31, 2018
FYI: I''ve started writing a smallvectune crate that can wrap |
29fd8a4 to
35ea50cCompareljedrz
commented
Sep 11, 2018
Rebased. |
eddyb
commented
Sep 11, 2018
nnethercote
commented
Sep 11, 2018
This PR currently makes two changes:
The first change seems fine. I agree that I'm less satisfied by the second change. The description above says "it is used in scenarios where the capacity of 1 is often exceeded, which might be nullifying the performance wins" -- do you have any measurements showing this? My general approach is profile-driven: I assume the existing code is reasonable, and only change such things when I have measurements showing it helps. I'm not comfortable with a blanket approach of changing every To move forward I would suggest removing |
nnethercote
left a comment
There was a problem hiding this comment.
(Changes requested are above.)
There was a problem hiding this comment.
This is the one that is changed to 8, BTW.
35ea50c to
d04a2a6Compareljedrz
commented
Sep 12, 2018
@nnethercote Thanks for the review! I wasn't aware these values were profiled and I now understand that changing them in an ad-hoc manner could be just as bad as spilling to the heap. I agree that waiting for a more precise solution is the right choice. The adjusted PR should make this future change easier. |
nnethercote
commented
Sep 12, 2018
Well, it's possible they are profiled, I don't know for sure. You could work it out with
In this case measurements are the equivalent of the "Go away and think" part. |
llogiq
commented
Sep 13, 2018
smallvectune has reached its first milestone: The data collector should work now, and uses an MPSC to collect the traces, so it's all thread-safe and shouldn't be too much of a performance burden (that said, I haven't benchmarked it...). |
bors
commented
Sep 17, 2018
☔ The latest upstream changes (presumably #54277) made this pull request unmergeable. Please resolve the merge conflicts. |
TimNN
commented
Sep 25, 2018
Ping from triage! @nnethercote / @ljedrz: Could you confirm the status of this PR? IIUC, it now only removes a type alias and uses a SmallVec implementation from an external crate. |
nnethercote
commented
Sep 25, 2018
As per #53824 (comment), I suggest that @ljedrz changes this PR to just be about removing |
ljedrz
commented
Sep 26, 2018
@nnethercote actually I already did that. I'll rebase it, this change should make future size tuning easier. |
d04a2a6 to
130a32fCompareljedrz
commented
Sep 26, 2018
Rebased. |
michaelwoerister
commented
Sep 26, 2018
Looking good! |
bors
commented
Sep 26, 2018
📌 Commit 130a32f has been approved by |
bors
commented
Sep 26, 2018
Remove OneVector, increase related SmallVec capacities Removes the `OneVector` type alias (equivalent to `SmallVec<[T; 1]>`); it is used in scenarios where the capacity of 1 is often exceeded, which might be nullifying the performance wins (due to spilling to the heap) expected when using `SmallVec` instead of `Vec`. The numbers I used in this PR are very rough estimates - it would probably be a good idea to adjust some/all of them, which is what this proposal is all about. It might be a good idea to additionally create some local type aliases for the `SmallVec`s in the `Folder` trait, as they are repeated in quite a few spots; I'd be happy to apply this sort of adjustments.
bors
commented
Sep 26, 2018
☀️ Test successful - status-appveyor, status-travis |
rust-highfive
commented
Sep 26, 2018
📣 Toolstate changed by #53824! Tested on commit c3a1a0d. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). |
Tested on commit rust-lang/rust@c3a1a0d. Direct link to PR: <rust-lang/rust#53824> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
fix breakage by rust-lang/rust#53824 use smallvec crate instead of rustcs type alias.
gnzlbg
commented
Oct 2, 2018
This broke interpolate idents. |
Removes the
OneVectortype alias (equivalent toSmallVec<[T; 1]>); it is used in scenarios where the capacity of 1 is often exceeded, which might be nullifying the performance wins (due to spilling to the heap) expected when usingSmallVecinstead ofVec.The numbers I used in this PR are very rough estimates - it would probably be a good idea to adjust some/all of them, which is what this proposal is all about.
It might be a good idea to additionally create some local type aliases for the
SmallVecs in theFoldertrait, as they are repeated in quite a few spots; I'd be happy to apply this sort of adjustments.