Skip to content
Snippets Groups Projects
Verified Commit d6ac5f89 authored by Josh Megnauth's avatar Josh Megnauth
Browse files

Avoid over allocations & reallocations

As we know, vectors amortize the cost of adding new elements by reserving
space for multiple elements when full. This is useful but may lead to
allocating more memory than necessary.

`relibc` generally avoids over allocations by reserving the exact amount
of space when possible. I fixed a few areas that still over allocated or
reallocated unnecessarily by leveraging iterators that are more likely
to know sizes.
parent a45c7b26
No related branches found
No related tags found
1 merge request!558Avoid over allocations & reallocations
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment