B-tree hinting?

Hi, I'm still alive :slight_smile: There's a small discussion on HN:
https://news.ycombinator.com/item?id=28008541

About B-tree path hints:

That are in C++11 (I didn't know it) too (search for 'hint'):
https://en.cppreference.com/w/cpp/container/map/insert

Is it a good idea to add similar methods to Rust stdlib BTreeMap/BTreeSet for hinting?

2 Likes

I could imagine something like this on Entry or the oft-proposed Cursor API. Internally, it could also help if the Extend implementation kept its own "hint" that incoming items might be somewhat sorted.

2 Likes