Using `insert_or_update_with` means that `elem` is only hashed once, so it will be approximately 2 times faster. You could write it as

```rust
do map.insert_or_update_with(elem, 1) |_, count| {
    *count += 1;
}
```

if you felt that was more readable.