Add |IsNotIn| EraseIf-helper and convert to in-place set-intersection
There are a few places where the Omnibox and friends need set-intersection
but they currently construct a new set doing so. With EraseIf and this
IsNotIn helper, it's trivial to do in-place set-intersection. It showed a
20% improvement under micro-benchmarks.
This patch includes an existing Omnibox conversion, plus one under
components/bookmarks.
Bug: 775805
Change-Id: Ic15b5d97c4c04ada4b1e70a3ad159d07909874ec
Reviewed-on: https://chromium-review.googlesource.com/726001
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Kevin Bailey <krb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511864}
CrOS-Libchrome-Original-Commit: 156ff6d76e1b9e7508f005da986eda27729224d2
2 files changed