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

feat: v2 of BTreeMap::Node to support unbounded types. #114

Merged
merged 8 commits into from
Aug 17, 2023
Merged

Conversation

ielashi
Copy link
Contributor

@ielashi ielashi commented Aug 15, 2023

Introduces V2 of BTreeMap::Node, which has a smaller memory footprint than V1 and includes support for unbounded types.

The implementation is currently not very efficient, as it deserializes all entries on load and serializes all entries on save. Performance enhancements will be included in subsequent PRs.

Note that V2 here is only used in tests and production continues to use V1.

Makes the proptest for nodes more rigorous by:

* Generating internal nodes that include children, and not just leaf nodes.
* Generate nodes with zero-sized keys and values

Enhancements to the documentation are also included.
Introduces V2 of `BTreeMap::Node`, which has a smaller memory footprint
than V1 and includes support unbounded types.

The implementation is currently not very efficient, as it deserializes
all entries on load and serializes all entries on save. Performance
enhancements will be included in subsequent PRs.

Note that V2 here is only used in tests and production continues to use
V1.
@ielashi ielashi requested review from roman-kashitsyn and a team as code owners August 15, 2023 13:49
src/btreemap/node.rs Show resolved Hide resolved
src/btreemap/node.rs Outdated Show resolved Hide resolved
src/btreemap/node.rs Show resolved Hide resolved
src/btreemap/node/v2.rs Show resolved Hide resolved
src/btreemap/node/v2.rs Outdated Show resolved Hide resolved
src/btreemap/node/v2.rs Show resolved Hide resolved
src/btreemap/node/v2.rs Show resolved Hide resolved
src/btreemap/node/v2.rs Outdated Show resolved Hide resolved
Base automatically changed from ielashi/v1_test_coverage to main August 17, 2023 09:19
# Conflicts:
#	src/btreemap/node.rs
#	src/btreemap/node/tests.rs
#	src/btreemap/node/v1.rs
@ielashi ielashi requested a review from dsarlis August 17, 2023 11:03
src/btreemap/node.rs Show resolved Hide resolved
src/btreemap/node/v2.rs Show resolved Hide resolved
@ielashi ielashi enabled auto-merge (squash) August 17, 2023 15:13
@ielashi ielashi merged commit e6dcf1b into main Aug 17, 2023
3 checks passed
@ielashi ielashi deleted the ielashi/add_v2 branch August 17, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants