I am trying to understand the performance of binary_search. I have a vector where I would like to perform binary_search. I also can create a map and assign each string in the vector a corresponding number (defined in the map) and then apply binary_search on this.
My question is, how the performance is going to be? is the performance for binary search performed on string vs numbers are the same? Can anybody point out any smarter way to do this?
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire