Skip to content

benchmark whether 1.5x is a better growth factor for vectors #4961

Closed
@thestinger

Description

@thestinger
  • libc++ and libstdc++ use 2x
  • MSVC, Java, boost, etc. all use 1.5x

Using a number lower than the golden ratio is supposed to play better with allocator pools and reduce memory fragmentation.

https://crntaylor.wordpress.com/2011/07/15/optimal-memory-reallocation-and-the-golden-ratio/

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions