Skip to content

std::vector::reserve before populating #190

Description

@yakra

Call std::vector::reserve before populating a vector when possible.

  • Speed: Don't waste time repeatedly reallocating
  • RAM: Avoid excess dynamically allocated space

  • Route::read_wpt: point_list & segment_list
  • grep vector -nH siteupdate.cpp; echo; grep -n std::vector $(find . -name '*.h') $(find . -name '*.cpp')
    grep -l std::vector $(find . -name '*.h') $(find . -name '*.cpp') | xargs pluma

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions