I am using the function insert with hint (emplace_hint) in the set/map.
The api doc said that when using hint place it will "begin search the final place from the hint palce and speeding up the process considerably when the actual insertion point is either position or close to it."
I want to know does the close here means before, after or both, and how to effectivly use this feature?
If use lower_bound or upper_bound to find the close place handbefore, it seems not speedup the process.
Aucun commentaire:
Enregistrer un commentaire