New issue
Advanced search Search tips

Issue 682240 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Research the possibility of using a small buffer optimisation in base::flat_set.

Reported by dyaros...@yandex-team.ru, Jan 18 2017

Issue description

This task is a followup to https://bugs.chromium.org/p/chromium/issues/detail?id=671759 and
https://bugs.chromium.org/p/chromium/issues/detail?id=682215

Container can have some memory inside, where it can store up to certain amount of elements. This is a common optimisation, used in many implementations of std::string for example.

For flat_set it can be useful, because:
* - flat_sets are good for small data sets, this is where small buffer optimisation may fire.
* - when doing set operations, it's not unreasonable to store flat_sets in a vector or in another flat_set. Then small buffer optimisation can get all the elements in one contiguous which can be of benefit.

A possible implementation would be to write a small_vector much like llvm's one:
http://llvm.org/docs/doxygen/html/classllvm_1_1SmallVector.html and then use it in flat_set.


 

Comment 1 by ajha@chromium.org, Jan 19 2017

Labels: TE-NeedsTriageHelp
Project Member

Comment 2 by sheriffbot@chromium.org, Feb 12 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment