Skip to content

std::deque default block size (4096) is too generous #31782

@llvmbot

Description

@llvmbot
Bugzilla Link 32435
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @mclow,@nico

Extended Description

Hi,

I profiled STL containers in Chrome on Android and found that std::deque (std::queue, std::stack) wastes considerable amount of memory because of its 4096-byte block size. I'm proposing changing block size to 512 bytes and min block length to 1.

More info in the doc: https://docs.google.com/document/d/1PEuPnSW54LaoWpUIEAHobqGt9nbD2DgQ_W5DdlJOkJU/edit#

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaconfirmedVerified by a second partylibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions