Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 2333253002: flat containers prototype (Closed)

Created:
4 years, 3 months ago by dyaroshev
Modified:
3 years, 9 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CL for a discussion in: https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-dev/vector$20based$20sets/chromium-dev/4uQMma9vj9w/HaQ-WvMOAwAJ Using flat_set/flat_map to optimise HQP. Things that are different from standard map/set: 1) Erasing/inserting causes iterator invalidation (like in a vector, which is the default implementation) 2) Has "unsafe_access" - gives a scoped object based on std::unique_ptr, that one can use to violate invariants of the map. In a destructor restores the invariants, unless one calls release. This is not even close to the production quality: tests are not sufficient, maybe some interface changes could be good. However this is good enough to advance the conversation.

Patch Set 1 : introducing flat sets/maps #

Patch Set 2 : using flat maps/sets to optimise #

Total comments: 1

Patch Set 3 : Fixing performance bug in insert(It, It) #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+947 lines, -12 lines) Patch
M base/BUILD.gn View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
A base/containers/flat_map.h View 1 chunk +106 lines, -0 lines 0 comments Download
A base/containers/flat_set.h View 1 chunk +59 lines, -0 lines 0 comments Download
A base/containers/flat_sorted_container_base.h View 1 2 1 chunk +265 lines, -0 lines 0 comments Download
A base/containers/flat_sorted_containers_unittest.cc View 1 chunk +499 lines, -0 lines 0 comments Download
M components/omnibox/browser/in_memory_url_index_types.h View 1 4 chunks +10 lines, -9 lines 0 comments Download
M components/omnibox/browser/url_index_private_data.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/omnibox/browser/url_index_private_data.cc View 1 2 2 chunks +2 lines, -2 lines 3 comments Download

Messages

Total messages: 17 (3 generated)
dyaroshev
https://codereview.chromium.org/2333253002/diff/20001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2333253002/diff/20001/components/omnibox/browser/url_index_private_data.cc#newcode645 components/omnibox/browser/url_index_private_data.cc:645: auto unsafe = history_id_set.unsafe_access(); Here is the tight spot ...
4 years, 3 months ago (2016-09-13 12:28:13 UTC) #2
Peter Kasting
The Boost flat containers are on the list of things approved for use in Google ...
4 years, 3 months ago (2016-09-13 19:12:56 UTC) #5
dyaroshev
On 2016/09/13 19:12:56, Peter Kasting wrote: > The Boost flat containers are on the list ...
4 years, 3 months ago (2016-09-13 20:24:12 UTC) #6
Peter Kasting
On 2016/09/13 20:24:12, dyaroshev wrote: > On 2016/09/13 19:12:56, Peter Kasting wrote: > > The ...
4 years, 3 months ago (2016-09-13 20:44:54 UTC) #7
dyaroshev
On 2016/09/13 20:44:54, Peter Kasting wrote: > > 1) boost::flat... do not have the unsafe_access ...
4 years, 3 months ago (2016-09-13 22:08:50 UTC) #8
Peter Kasting
On 2016/09/13 22:08:50, dyaroshev wrote: > > I'm very uneasy about any API that is ...
4 years, 3 months ago (2016-09-13 22:20:20 UTC) #9
dyaroshev
On 2016/09/13 22:20:20, Peter Kasting wrote: > On 2016/09/13 22:08:50, dyaroshev wrote: > > I ...
4 years, 3 months ago (2016-09-13 23:19:38 UTC) #10
dyaroshev
On 2016/09/13 22:20:20, Peter Kasting wrote: > The rest of boost/container/ is not approved, so ...
4 years, 3 months ago (2016-09-14 12:17:54 UTC) #11
dyaroshev
On 2016/09/14 12:17:54, dyaroshev wrote: > Here is what I could shrink it to (140 ...
4 years, 3 months ago (2016-09-14 15:01:50 UTC) #12
Peter Kasting
https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode256 components/omnibox/browser/url_index_private_data.cc:256: cache_iter = search_term_cache_.erase(cache_iter); FWIW, now that C++11 provides this ...
4 years ago (2016-11-29 19:17:45 UTC) #13
dyaroshev
https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode256 components/omnibox/browser/url_index_private_data.cc:256: cache_iter = search_term_cache_.erase(cache_iter); On 2016/11/29 19:17:45, Peter Kasting wrote: ...
4 years ago (2016-11-29 20:09:14 UTC) #14
Peter Kasting
https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc File components/omnibox/browser/url_index_private_data.cc (right): https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode256 components/omnibox/browser/url_index_private_data.cc:256: cache_iter = search_term_cache_.erase(cache_iter); On 2016/11/29 20:09:14, dyaroshev wrote: > ...
4 years ago (2016-11-29 20:29:06 UTC) #15
dyaroshev
On 2016/11/29 20:29:06, Peter Kasting wrote: > https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc > File components/omnibox/browser/url_index_private_data.cc (right): > > https://codereview.chromium.org/2333253002/diff/40001/components/omnibox/browser/url_index_private_data.cc#newcode256 ...
4 years ago (2016-11-30 21:34:15 UTC) #16
Peter Kasting
3 years, 10 months ago (2017-02-11 01:56:03 UTC) #17
Now that flat sets have landed in base, this CL should presumably be rebased on
top of those.

Powered by Google App Engine
This is Rietveld 408576698