Behind the scenes the compiler shall analyse all your calls to that data structure and see what APIs you use to interact with it.
It can then decide which algorithms to use to optimise your interaction with that data structure.
If only computers could do hot/cold analysis. It could detect that you call a hash lookup in a hot for loop but only call the ordered map iterator from the admin screen and outside a loop.
I would then JIT compile the right data structure algorithm used from a bucket of implemented algorithms. So the data is kept optimised for its usage patterns.
Decisions such as use tombstones, compaction, vacuum, LSM trees, btrees, ordered, unordered, LSM trees with separate value storage, a growable array, a std::list or vector. All depend on what your intended access patterns to the data is.
Could also do clever materialized views. If you only use one view of the data rarely, it isn't efficient to maintain that view.