-
Notifications
You must be signed in to change notification settings - Fork 27
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: implement DoubleEndedIterator
for StableBTreeMap
#235
Conversation
I don't really understand the use case for Maybe |
Can you also revert the changes in |
I don't feel particularly strongly either way. If indeed people find them useful, I don't see why not adding them. In a sense, we should ideally provide a very similar interface to the std BTreeMap but of course these things typically happen on a "as needed" basis. |
Yeah let's hold off for now but I think it would be good to have them at some point since within OpenChat we already have some use cases where we load both keys and values when we only need keys. |
|
@hpeebles I do see some non-negligible regressions in iter benchmarks (both for smaller and larger values). Do you think we could maybe do something to make them a bit better? |
Benchmarks show some regression that we should look into.
Yeah I don't think it was 36% when I originally ran them a few commits ago so I'll have a play around to see where that got added. |
This adds the ability to iterate a
StableBTreeMap
in either direction.We have been using this within OpenChat for a few weeks now with no issues.