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ý committed 2019-11-14 10:53:12 +01:00
1 parent 302e2c0b06
commit d36c15c3ca
18 files changed
+296 -187

No files matched your search

@@ -9,10 +9,12 @@
#define TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED
#include <vector>
#include <memory>
namespace Catch {
class TestSpec;
struct TestCaseInfo;
struct ITestInvoker {
virtual void invoke () const = 0;
@@ -24,6 +26,7 @@ namespace Catch {
struct ITestCaseRegistry {
virtual ~ITestCaseRegistry();
virtual std::vector<std::unique_ptr<TestCaseInfo>> const& getAllInfos() const = 0;
virtual std::vector<TestCaseHandle> const& getAllTests() const = 0;
virtual std::vector<TestCaseHandle> const& getAllTestsSorted( IConfig const& config ) const = 0;
};