I'm running into the case often of having to set a dictionary key to a value (always an integer) if and only if the new value is greater than the old one. Profiling reveals the way I'm currently doing it is taking up a full 1/3 of the time of a certain function. Here's how I'm currently doing it:

```
some_dict[k] = max(new_val, some_dict.get(k, 0))

```

Is there a faster way?