New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 701543 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use flat containers to reduce memory

Project Member Reported by dskiba@chromium.org, Mar 14 2017

Issue description

Some containers are really inefficient when used with small payloads. For example std::set<void*> uses only 20% of its memory for the payload. See more details here: https://docs.google.com/document/d/1YL1FORFMWo0FK0lMg7WsImnjNQ3ZpY0nK0NHGjkeHT4/edit?usp=sharing

In some cases we can use "flat" containers that don't waste as much. One example is base::flat_set, which is drop-in replacement for std::set, and is more memory efficient.

Companion flat_map container is about to land (https://codereview.chromium.org/2715433007).
 

Comment 1 by dskiba@chromium.org, Mar 14 2017

Description: Show this description
Status: Assigned (was: Untriaged)

Comment 3 by dskiba@chromium.org, May 18 2018

Owner: ----
Status: Available (was: Assigned)
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.

Sign in to add a comment