Use base::flat_map in base::FeatureList.
It is mostly accessed for read, which means that the memory locality is likely to be more useful than pointer stability or fast insertions. At least one call site to base::FeatureList has indicated concern about the access times, and base/containers/README.md recommends flat_map for cases such as this. Two fields in a private struct must be non-const for this to work, since having const fields makes them not assignable and thus not usable in a vector. Change-Id: Iaed0d07e5dd765e592d57f6ff5b38b2b48040119 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560060Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#831144}
Showing
Please register or sign in to comment