• Jeremy Roman's avatar
    Use base::flat_map in base::FeatureList. · f3a945c5
    Jeremy Roman authored
    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: default avatarDaniel Cheng <dcheng@chromium.org>
    Commit-Queue: Jeremy Roman <jbroman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#831144}
    f3a945c5
feature_list.h 18.4 KB