-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of creating multiple vectors each time we encounter a build edge or default edge we store them as member variables and reused them to keep their capacity. `std::vector<std::string>` will still destruct the `std::string` objects when calling `clear()` and this will release our memory. So we write a `PathVector` that keeps the `std::string` objects around and creates them with a reasonable (1Kb) capacity to avoid most reallocations.
- Loading branch information
1 parent
71e95df
commit ba08642
Showing
1 changed file
with
69 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters