title: What is the quickest way of inserting/updating std::unordered_map elements without using an if?
body: <p>I currently have lots of code which looks like this:</p>
  
  <pre><code>std::unordered_map&lt;int,int&gt; my_dict;
  .
  .
  .
  // If the key does exist in the dictionary
  if(my_dict.count(key) == 1){
      my_dict[key] = value;
  }
  
  // If its a new key
  else{
      my_dict.insert(std::make_pair(key,value));
  }
  </code></pre>
  
  <p>Is there any way I can speed this up by just overwriting the value every time?</p>