Таким образом, существует, по-видимому, два общеприемлемых метода определения того, существует или нет ключ в std:: map:
map.find(key) != map.end()
map.count(key) > 0
Является ли более эффективным, чем другой? В частности, понятие count() может быть истолковано как означающее, что метод будет перебирать по каждому ключу, подсчитывая общее количество (и из-за определения std:: map, что общий счет всегда будет 0 или 1). Считается ли count() "останавливаться" после матча, работая с той же сложностью, что и find()?