Insert Test¶
The test compared the insert 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 insert_test .
We used three different element sizes (small, medium, large) for testing, with the number of elements ranging from 1 to 4751, increasing by 250 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.
To increase the distinctiveness of the results, we performed
insertoperations at the begin of the sequence.
Result¶
The test results are as follows: as the number of elements and the size of elements being insert 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.