Store tags in one big pre-allocated string and only work with refs

This should decrease the number of allocations before main is entered
significantly, but complicates the code somewhat in return.

Assuming I used `massif` right, doing just `SelfTest --list-tests`
went from 929 allocations at "Remove gcc-4.9 from the travis builds"
(2 commits up), to 614 allocations with this commit.
This commit is contained in:
Martin Hořeňovský 2019-11-07 12:39:07 +01:00
parent 302e2c0b06
commit d36c15c3ca
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
18 changed files with 296 additions and 187 deletions

View file

@ -78,6 +78,10 @@ namespace Catch {
m_invokers.push_back(std::move(testInvoker));
}
std::vector<std::unique_ptr<TestCaseInfo>> const& TestRegistry::getAllInfos() const {
return m_infos;
}
std::vector<TestCaseHandle> const& TestRegistry::getAllTests() const {
return m_handles;
}