diff options
author | Evan Brown <ezb@google.com> | 2023-07-20 09:56:18 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-07-20 09:57:21 -0700 |
commit | 9f1dcc70d64232e77964de9b90e209e23e0110db (patch) | |
tree | 770e61c9929a6e304c7d3c2aa98e0dc9b8c7cbb5 /.github | |
parent | 89367c603be2c6b3e8c7a3d17f53ea6c3a68bd7d (diff) |
Add a special case for erase(begin(), end()) to reset the control bytes. The motivation is to avoid potentially expanding the table unnecessarily later.
Note: I prefer doing this as a special case in erase(iterator, iterator) rather than special casing erase(iterator) for size==1 because IIUC that changes the time complexity of erase(iterator) from O(1) to O(N) and in pathological cases, it could change loops from O(N) to O(N^2).
PiperOrigin-RevId: 549661855
Change-Id: I8603324260f51a98809db32f840ff09f25cf2481
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions