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

Add fast last(), last_mut() and upper_bound() operations… #12

Closed
wants to merge 1 commit into from

Conversation

dhardy
Copy link

@dhardy dhardy commented Dec 5, 2015

…via additional constraints on internal vec

I wrote this as a proof of concept to satisfy a use-case of mine (actually, in my use case elements are never removed so the implementation could be simpler).

This adds three new operations which should all be constant time, at the cost of potentially making remove() and split_off() O(n) operations. Thoughts?

The new operations could of course be added without the other changes, but in that case they would merely be convenience wrappers.

Review on Reviewable

@Gankra
Copy link
Contributor

Gankra commented Dec 5, 2015

I don't really care about split_off, but penalizing remove seems pretty harsh.

(If I don't review this further in a few days, please ping me again; my thesis is due very soon!)

@dhardy
Copy link
Author

dhardy commented Dec 6, 2015

Yes, I think I agree with you (as I said, proof of concept).

Good luck with the thesis.

@Gankra
Copy link
Contributor

Gankra commented Jul 26, 2017

WOW this old! I'm gonna close this; feel free to reopen rebase if you're still interested!

@Gankra Gankra closed this Jul 26, 2017
@dhardy
Copy link
Author

dhardy commented Jul 27, 2017

Nope, can't remember why I wanted this.

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.

None yet

2 participants