Efficient use of devector as queue or stack.
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the devector implementation and its front- and back-capacity reservation functions; the issue does not name files or tests. Review how capacity is centered today, then define what configurable per-end policies and allocation-free moves should mean for queue- and stack-like use cases. Done means those policies support the described one-ended workloads without wasting capacity.
Written by the indexing model from the issue text.
Description
The current policy of devector is to move the data to the middle of the allocated region whenever capacity is needed on an end.
This results in half of the free capacity being wasted when only one end of the devector is used.
Instead, the policy for free capacity for the devector should be configurable separately for each end.
This would make it easy to provide configurations for contiguous queues.
Additionally, the functions to reserve capacity in the front or back always allocate if space is needed. Instead, if sufficient capacity per the policy is available on the other end, the data could be moved without the new allocation. This is most appropriate for queues which have need of capacity on only one end.
Avoiding problems like this would ideally be done by parameterizing the algorithmic choices of devector into general policies.
- Dominant language
- C++
- Stars
- 127
- Forks
- 126
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/container
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in boostorg/container
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100