Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[core] Implement SmallVector using std::vector #7165
This the starting point for removing SmallVector by making SmallVector an adapter type.
The public and protected interface to SmallVector are unchanged
Temporary default constructors are added to the following structs
Where vector is required, transition immediately to std::vector
So 11% slower compilation, not surprising seeing as this is an intermediate shim. I expect this to improve once SmallVector is removed completely, as only one template will be instantiated per use, rather than two.
Run time performance would hopefully be better, owing to exponential growth of storage rather than linear growth. The loss of realloc may counter that to some degree. But if trivially relocatable types (P1144R1) are approved for C++20 then that would be resolved automatically.
Also explicit template instantiation should yield good results.
Running for 10000 ticks I got:
So a boost in all categories!
EDIT: Reviewing individual commits is a must for this PR!