I know that for an unordered map, "find" returns an iterator while "at" returns the mapped value. I am just curious about which one is faster.
You shouldn't choose between the two of them based on the speed, pick the method that better express your intention. When you use at
you are assuming that the element is in the map (you get an exception otherwise). With find
this is not the case.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments