Push_back Test¶
The test compared the push_back operation times of vector_pro and std::vector with the same initial list length, under different element sizes and quantities.
Test Code¶
See the full code at push_test .
We used three different element sizes (small, medium, large) for testing, with the number of elements ranging from 1 to 1901, increasing by 100 for each test.
To ensure the reliability of the test results in each scenario, we conducted 20 tests for each container and took the average. In the first 10 tests, vector_pro started first, while in the latter 10 tests, std::vector started first.
Result¶
The test results are as follows: as the number of elements and the size of elements being push_back increases, the time consumption difference between vector_pro and std::vector gradually widens.

You can find detailed information on each test element, the time measurement functions used, and the system specifications under the project's directory.