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

Switch the current implementation to use btree_cursors #21

Closed
ripytide opened this issue Apr 1, 2023 · 4 comments
Closed

Switch the current implementation to use btree_cursors #21

ripytide opened this issue Apr 1, 2023 · 4 comments
Labels
refactor Improvement to code quality

Comments

@ripytide
Copy link
Owner

ripytide commented Apr 1, 2023

The current implementation is very much a bodge of using the range method largely in a unintended fashion.

Instead I propose we switch to using btree_cursors, which is a new API that was proposed with the express intention of improving the implementations of interval collections such as this ones this project provides.

The btree_cursors feature is currently a nightly unstable feature so this would more concretely lock us onto the nightly version of rust than the currently used, but more work-a-roundable features we are using at the moment.

Overall I think this will greatly improve the simplicity of the code, and will also greatly improve the performance due to using more fit-for-purpose methods on the raw BTreeMap.

Related btree_cursors Issues and PRs
Tracking Issue: rust-lang/rust#107540
Proposal: rust-lang/libs-team#141
Implementation: rust-lang/rust#105641
Related Entry Proposal: rust-lang/libs-team#73

@ripytide ripytide added the refactor Improvement to code quality label Apr 1, 2023
@ripytide
Copy link
Owner Author

ripytide commented Apr 1, 2023

I should probably report on my finished usage and experience after using the new feature on the tracking issue, if that's the right place for feedback I'm not sure.

@ripytide
Copy link
Owner Author

ripytide commented Apr 6, 2023

closing in favor of #25

@ripytide ripytide closed this as completed Apr 6, 2023
@workingjubilee
Copy link

I should probably report on my finished usage and experience after using the new feature on the tracking issue, if that's the right place for feedback I'm not sure.

Probably.

@ripytide
Copy link
Owner Author

ripytide commented May 5, 2023

@workingjubilee I ended up not really using btree_cursors as much as I planned in favor of ripytide/btree_monstrousity . Hence I don't really have much feedback other than cursors seem useful it certain situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvement to code quality
Projects
None yet
Development

No branches or pull requests

2 participants