Generalize arrangements to Containers#281
Merged
frankmcsherry merged 5 commits intoTimelyDataflow:masterfrom Nov 24, 2022
Merged
Generalize arrangements to Containers#281frankmcsherry merged 5 commits intoTimelyDataflow:masterfrom
frankmcsherry merged 5 commits intoTimelyDataflow:masterfrom
Conversation
38ed8ac to
29a41c8
Compare
29a41c8 to
c9896c1
Compare
f4ee3a6 to
d5d33fa
Compare
d5d33fa to
9d26dc2
Compare
9d26dc2 to
afb6aa9
Compare
6372ead to
152926a
Compare
generalized implementation generalize ord to containers very silly error prototype column container demonstrate potential improvement tabs to spaces enable regions in batch formation fix test
…imely Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
frankmcsherry
commented
Aug 29, 2022
Comment on lines
+165
to
+172
| fn with_capacity(_size: usize) -> Self { | ||
| Self::default() | ||
| } | ||
| fn reserve(&mut self, _additional: usize) { | ||
| } | ||
| fn merge_capacity(_cont1: &Self, _cont2: &Self) -> Self { | ||
| Self::default() | ||
| } |
Member
Author
There was a problem hiding this comment.
These look like they should be implemented in order to be competitive.
frankmcsherry
commented
Aug 29, 2022
| let mut write_position = index; | ||
| for position in index .. self.len() { | ||
| if predicate(position, &self[position]) { | ||
| // TODO: compact the inner region and update pointers. |
Member
Author
There was a problem hiding this comment.
What does this mean? :D
Member
Author
There was a problem hiding this comment.
Looks vestigial, as it also appears (with clearer meaning) in the columnation code.
frankmcsherry
commented
Aug 29, 2022
frankmcsherry
commented
Aug 29, 2022
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Expose capacity/reserve of TimelyStack
frankmcsherry
commented
Nov 24, 2022
Comment on lines
+169
to
+170
| fn reserve(&mut self, _additional: usize) { | ||
| } |
Member
Author
There was a problem hiding this comment.
We use this in various push_merge implementations for trie layers. I don't think it should block merging this PR, but probably worth pondering at least briefly. For example:
let (trie1, mut lower1, upper1) = other1;
let (trie2, mut lower2, upper2) = other2;
self.vals.reserve((upper1 - lower1) + (upper2 - lower2));
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR-in-progress generalizes the storage used for arrangement batches to a
Containertrait that informally looks like aVecbut is not obliged to have that implementation. In particular, we are interested in theColumnationimplementation, which maintains aVec-like storage but whose items can arrange their owned members in contiguous memory.