-
Notifications
You must be signed in to change notification settings - Fork 145
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
Implementation of RFC #240 #284
Conversation
This is great! I haven't had time to review the code yet, but I really appreciate you working on this. |
- document unsafe code - improve perf for extend - add benchmark for extend
i made some improvements. here are the updated benchmarks.
the one regression that isn't just benchmark noise is |
actually, it's strange. i'm seeing a regression for |
Note: I am beginning to review this code, and should have any feedback ready within a few days. |
☔ The latest upstream changes (presumably 09b4988) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Sorry it took so long to review.
If you would like, we can rebase and merge this as-is, and then deal with remaining issues (like doc comments, performance work, and filling in any missing features) in follow-up patches, which I'm happy to do myself or to accept PRs for.
} | ||
|
||
#[inline] | ||
pub const fn value(self, is_zst: bool) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you thank of making TaggedLen
be generic (TaggedLen<T>
), so we wouldn't need to pass is_zst
arguments to its methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's the issue of the variance of TaggedLen
with respect to T
. it has to be covariant so that the vector is also covariant, but i don't feel like that option makes sense to me since it doesn't really contain a T
(maybe have it contain a PhantomData<fn() -> T>
?). ideally i'd like to have TaggedLen<const IS_ZST: bool>(...)
but we run into current limitations of const generics when doing that.
i'd personally keep it as is but the decision is up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what's the next step? should i port over the additions from upstream or do we merge this as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry again for the radio silence. My plan is to merge this as-is, effectively making this branch the new mainline, and open issues for porting the remaining changes and any other missing pieces. The current master
branch will become a v1
branch, for bug fixes only. I'm not sure when I'll have time to get to this, but it's still on my to-do list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem! let me know if i can be of any help
Hi, I might be missing something but it looks to me as if |
Sorry, it has been a very long time but I have not forgotten this. I will make this the main branch as soon as smallvec 1.11.0 has been released (#300). |
This code is now on the default branch of the repository. The next steps will be porting changes from the We should write up an issue with a more detailed list of work remaining... |
Implementation of the API described in #240
The API and tests were modified and all the tests pass.
So far the docs aren't written yet. But I wanted to hear the feedback on the current progress before going further.
current benchmark results: there are a few regressions but i believe i can handle them