Use base::flat_[set|map] over std::[set|map] in Print Preview UI
For small maps and sets that contain efficiently moveable items, base::flat_[set|map] performs inserts better than std::[set|map], because the former avoids mallocs. Additionally, base::flat_[set|map] has a smaller overhead than its STL counterpart. Usage recommendation can be found at base/containers/README.md. All the substitutions in this CL are made on containers that are expected to be small (< dozens of entries) and that hold light and easily moveable items. Change-Id: I2fe35182cd7c85479db4b7b6343ea9af031031ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925438 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#718312}
Showing
Please register or sign in to comment