feat: implement DoubleEndedIterator for StableBTreeMap#235
feat: implement DoubleEndedIterator for StableBTreeMap#235dsarlis merged 18 commits intodfinity:mainfrom
DoubleEndedIterator for StableBTreeMap#235Conversation
|
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
StableBTreeMapin either direction.We have been using this within OpenChat for a few weeks now with no issues.