One of the common operations for sorted maps/sets is looking at first or last few elements. C++ std::map has constant time complexity for begin() and end(). While BTreeMap might be better in many ways I cannot even use it because getting the first and last iterator is 2*log(n). And this isn't something easily fixed by making a wrapper with my needs because on new inserts to front or back of the collection, I would need to do another log(n) probe to get the first/last iter.
As it stands, two log(n) probes to get a front of tree iterator is way too expensive for my use. Can a constant time version be made?
(This isn't unique btreemap, i've also had re-implement my down doubly linked list because of similar issues where the idea sounds nice, but it just lacks some basic functionality to make it useful in more complex cases.)