Skip to content

[libc++] Optimize vector::emplace_back - #218658

Merged
philnik777 merged 1 commit into
llvm:mainfrom
philnik777:optimize_vector_emplace_back
Sep 3, 2026
Merged

philnik777 merged 1 commit into
llvm:mainfrom
philnik777:optimize_vector_emplace_back

Conversation

@philnik777

@philnik777 philnik777 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This avoids using a lot of stack memory for emplace_back by making the outlined lambda static. This also reduces the number of instructions to execute a simple emplace_back.

@philnik777

philnik777 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

/libcxx-bot benchmark libcxx/test/benchmarks/containers/sequence/vector.bench.cpp

Running benchmarks in https://github.com/llvm/llvm-project/actions/runs/32841833990

@philnik777
philnik777 force-pushed the optimize_vector_emplace_back branch from 260eca1 to cedd02e Compare August 25, 2026 11:26
@philnik777

philnik777 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

/libcxx-bot benchmark libcxx/test/benchmarks/containers/sequence/vector.bench.cpp

Running benchmarks in https://github.com/llvm/llvm-project/actions/runs/32842364451

Benchmark results for linux-x86_64-20260812:
Benchmark                                                                                                               Baseline    Candidate    Difference    % Difference   Significant?   95% C.I. of %diff
--------------------------------------------------------------------------------------------------------------------  ----------  -----------  ------------  --------------  --------------  -------------------
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/32                          822.75       819.97         -2.78          -0.34%                  [-0.9%, +0.7%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/8192                       7100.21      7263.30        163.09           2.30%                  [-4.3%, +6.6%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/32                     1500.47      1526.05         25.58           1.71%                  [-3.0%, +3.0%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/8192                 176821.39    175481.77      -1339.61          -0.76%                  [-3.1%, +1.9%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                 54.36        49.56         -4.80          -8.83%        x         [-9.5%, -7.9%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192            13130.83     11791.89      -1338.94         -10.20%        x         [-16.1%, -7.3%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32            239.18       271.68         32.50          13.59%                  [-2.7%, +25.0%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192        81944.76     84640.22       2695.46           3.29%                  [-8.1%, +11.5%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                        51.90        51.35         -0.55          -1.06%                  [-9.3%, +3.3%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                   11635.18     11719.89         84.71           0.73%                  [-4.3%, +4.3%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                  1152.51      1118.90        -33.61          -2.92%        x         [-4.4%, -0.6%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                              314815.69    307754.45      -7061.24          -2.24%                  [-5.6%, +0.3%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/32                                                     52.03        52.02         -0.01          -0.02%                  [-6.9%, +5.3%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/8192                                                11692.30     11857.65        165.36           1.41%                  [-4.3%, +4.7%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/32                                               1129.06      1109.16        -19.91          -1.76%                  [-4.2%, +0.3%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/8192                                           315388.44    308838.62      -6549.82          -2.08%                  [-3.9%, +0.3%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/32                                               52.52        51.48         -1.04          -1.98%                  [-9.7%, +1.8%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/8192                                          11999.75     11762.64       -237.11          -1.98%                  [-7.0%, +4.6%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/32                                         1127.62      1118.80         -8.82          -0.78%                  [-2.6%, +2.1%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/8192                                     310039.34    309744.41       -294.93          -0.10%                  [-2.9%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/32                                                                  30.31        30.50          0.19           0.64%                  [-2.0%, +4.3%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/8192                                                              5041.04      5040.85         -0.19          -0.00%                  [-0.3%, +0.8%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                              47.08        47.04         -0.04          -0.09%                  [-0.7%, +0.5%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                          8460.36      8481.19         20.83           0.25%                  [-0.8%, +1.5%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                        1177.28      1189.86         12.58           1.07%                  [-3.1%, +3.1%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                    309958.53    308319.97      -1638.56          -0.53%                  [-3.5%, +6.7%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/32                                                  33.87        33.81         -0.07          -0.20%                  [-1.5%, +0.9%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/8192                                              8412.82      8426.59         13.77           0.16%                  [-6.4%, +3.3%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/32                                              50.84        52.75          1.91           3.76%                  [-1.1%, +8.0%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/8192                                          8472.64      8463.11         -9.53          -0.11%                  [-0.6%, +0.5%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/32                                                 18.91        18.69         -0.22          -1.17%                  [-4.0%, +1.2%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/8192                                             4216.95      4214.11         -2.84          -0.07%                  [-1.8%, +0.7%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/32                                             35.81        36.13          0.32           0.90%                  [-2.8%, +2.9%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/8192                                         4237.15      4236.26         -0.90          -0.02%                  [-0.4%, +0.6%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/32                                       113.67       115.28          1.61           1.41%                  [-4.3%, +5.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/8192                                   42543.34     39050.39      -3492.95          -8.21%                  [-12.7%, +5.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/32                                   185.09       183.28         -1.81          -0.98%                  [-2.3%, +1.3%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/8192                               18989.99     19884.67        894.68           4.71%                  [-9.9%, +13.6%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/32                                  30.02        29.81         -0.21          -0.70%                  [-3.8%, +0.8%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/8192                                 2.58         2.70          0.12           4.65%        x         [+2.1%, +8.9%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/32                              50.42        50.49          0.07           0.14%                  [-5.6%, +2.2%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/8192                            22.73        22.61         -0.12          -0.53%                  [-3.3%, +1.9%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(cheap_elements)                                       0.10         0.10          0.00           0.47%                  [-2.0%, +5.1%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(expensive_elements)                                   0.18         0.18          0.00           1.96%        x         [+0.8%, +2.8%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/32                                                    29.81        29.72         -0.09          -0.31%                  [-1.9%, +2.7%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/8192                                                8335.23      8401.04         65.82           0.79%                  [-0.0%, +1.4%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/32                                                47.97        48.21          0.24           0.50%                  [-0.3%, +2.8%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/8192                                            8409.88      8399.55        -10.32          -0.12%                  [-0.6%, +0.9%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/32                                                   17.90        17.94          0.03           0.19%                  [-0.8%, +2.7%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/8192                                               4208.95      4203.36         -5.59          -0.13%                  [-0.4%, +0.2%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/32                                               34.41        38.19          3.78          10.98%        x         [+7.2%, +12.8%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/8192                                           4245.44      4236.17         -9.28          -0.22%                  [-0.7%, +0.1%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/32                                                   33.75        33.75         -0.00          -0.01%                  [-1.6%, +1.1%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/8192                                               8430.43      8441.21         10.78           0.13%                  [-5.3%, +2.6%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/32                                               50.96        51.29          0.33           0.64%                  [-3.7%, +8.5%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/8192                                           8473.08      8457.29        -15.78          -0.19%                  [-0.6%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32            936.09       952.96         16.87           1.80%                  [-0.9%, +4.6%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192        26128.18     25882.37       -245.81          -0.94%                  [-3.2%, +1.7%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32       1646.65      1665.09         18.45           1.12%                  [-0.8%, +4.8%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192   339041.84    342140.53       3098.70           0.91%                  [-1.3%, +2.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32             1055.87      1064.48          8.61           0.82%                  [-1.4%, +4.4%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192          48491.28     48255.17       -236.11          -0.49%                  [-3.2%, +1.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32         1759.30      1723.38        -35.92          -2.04%                  [-5.7%, +2.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192    1211679.73   1207478.78      -4200.95          -0.35%                  [-2.6%, +0.7%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32            1048.42      1042.00         -6.42          -0.61%                  [-1.0%, +0.5%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192         24174.49     24229.75         55.26           0.23%                  [-1.4%, +1.4%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32        1772.81      1770.44         -2.37          -0.13%                  [-8.2%, +2.5%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192    188162.07    194774.56       6612.49           3.51%        x         [+0.2%, +7.3%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/32                                                  19.04        18.59         -0.45          -2.35%        x         [-3.3%, -0.9%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/8192                                              4224.36      4205.85        -18.50          -0.44%                  [-3.7%, +1.0%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/32                                              35.54        36.81          1.26           3.55%                  [-1.8%, +6.6%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/8192                                          4246.91      4233.38        -13.53          -0.32%        x         [-0.5%, -0.1%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/32                                          35.05        35.36          0.31           0.88%                  [-1.7%, +8.0%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/8192                                      8518.95      8459.61        -59.35          -0.70%                  [-6.5%, +5.9%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/32                                     212.95       243.51         30.56          14.35%                  [-1.4%, +20.6%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/8192                                 76555.77     78526.05       1970.29           2.57%                  [-11.1%, +17.4%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/32                                          117.49       114.48         -3.01          -2.56%                  [-5.9%, +1.1%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/8192                                      41875.66     42992.45       1116.80           2.67%                  [-9.3%, +9.7%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/32                                      183.81       181.21         -2.60          -1.41%                  [-3.1%, +1.4%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/8192                                  18796.78     18690.38       -106.40          -0.57%                  [-5.5%, +3.9%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/32                                     29.99        29.92         -0.07          -0.23%                  [-1.1%, +0.2%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/8192                                    2.56         2.71          0.15           5.91%        x         [+0.7%, +9.8%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/32                                 51.22        50.92         -0.30          -0.58%                  [-4.2%, +1.7%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/8192                               23.18        23.01         -0.17          -0.73%                  [-2.4%, +1.2%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/32                                       1.66         1.50         -0.16          -9.49%        x         [-11.1%, -7.9%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/8192                                     1.66         1.51         -0.16          -9.41%                  [-31.2%, +2.8%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/32                                  34.80        34.09         -0.71          -2.03%                  [-4.2%, +0.5%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/8192                                33.68        33.40         -0.28          -0.84%                  [-2.2%, +1.0%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/32                                               802.65       792.31        -10.35          -1.29%        x         [-1.6%, -0.8%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/8192                                            1506.06      1488.00        -18.06          -1.20%                  [-6.2%, +5.1%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                                       5.01         5.31          0.30           6.09%        x         [+4.9%, +6.9%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                                   655.97       656.86          0.89           0.14%                  [-0.9%, +1.0%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                             16.88        16.64         -0.23          -1.39%                  [-3.1%, +1.8%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                          689.86       693.72          3.87           0.56%                  [-2.2%, +2.9%]
std::vector<int>::ctor(Range)_(cheap_elements)/32                                                                          17.46        17.61          0.14           0.82%        x         [+0.2%, +2.7%]
std::vector<int>::ctor(Range)_(cheap_elements)/8192                                                                       757.95       762.10          4.14           0.55%                  [-7.3%, +7.7%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/32                                                                    17.78        17.77         -0.01          -0.06%                  [-1.2%, +1.0%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/8192                                                                 758.71       758.90          0.20           0.03%                  [-7.3%, +7.7%]
std::vector<int>::ctor(size_type)/32                                                                                       16.93        17.50          0.57           3.38%                  [-1.1%, +5.2%]
std::vector<int>::ctor(size_type)/8192                                                                                    397.72       397.74          0.02           0.01%                  [-0.9%, +0.8%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                                   15.39        15.33         -0.06          -0.38%                  [-1.0%, +1.8%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                                676.36       676.97          0.61           0.09%                  [-0.3%, +0.6%]
std::vector<int>::emplace(begin)_(cheap_elements)/32                                                                       15.85        15.89          0.05           0.30%                  [-2.3%, +1.5%]
std::vector<int>::emplace(begin)_(cheap_elements)/8192                                                                    333.88       334.24          0.36           0.11%                  [-0.3%, +0.4%]
std::vector<int>::emplace(middle)_(cheap_elements)/32                                                                      13.44        13.43         -0.01          -0.10%                  [-1.0%, +0.4%]
std::vector<int>::emplace(middle)_(cheap_elements)/8192                                                                   169.19       168.96         -0.23          -0.13%                  [-5.7%, +2.7%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/32                                                             82.17        81.75         -0.42          -0.51%                  [-7.5%, +8.0%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/8192                                                         6174.67      6181.31          6.64           0.11%                  [-0.6%, +0.6%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/32                                                       28.04        27.99         -0.05          -0.19%                  [-0.4%, +0.1%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/8192                                                      0.84         0.84         -0.00          -0.01%                  [-7.7%, +3.4%]
std::vector<int>::emplace_back()_(with_reserve)_(cheap_elements)                                                            0.10         0.10         -0.00          -0.09%                  [-0.5%, +0.3%]
std::vector<int>::erase(begin)_(cheap_elements)/32                                                                          9.33         9.34          0.01           0.14%                  [-2.5%, +7.6%]
std::vector<int>::erase(begin)_(cheap_elements)/8192                                                                      493.84       494.25          0.41           0.08%                  [-0.3%, +0.3%]
std::vector<int>::erase(middle)_(cheap_elements)/32                                                                         8.12         8.11         -0.01          -0.11%                  [-8.2%, +16.9%]
std::vector<int>::erase(middle)_(cheap_elements)/8192                                                                     251.72       252.30          0.57           0.23%                  [-0.2%, +0.7%]
std::vector<int>::insert(begin)_(cheap_elements)/32                                                                        15.65        15.67          0.02           0.12%                  [-0.5%, +0.3%]
std::vector<int>::insert(begin)_(cheap_elements)/8192                                                                     333.88       333.29         -0.58          -0.18%                  [-1.0%, +1.2%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                                 860.50       853.71         -6.79          -0.79%                  [-2.8%, +3.3%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                              9543.13      9377.58       -165.56          -1.73%        x         [-2.4%, -0.9%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                                   895.51       880.85        -14.66          -1.64%                  [-4.1%, +2.4%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                                8666.82      7064.62      -1602.20         -18.49%        x         [-20.7%, -16.8%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                                  845.35       846.62          1.27           0.15%                  [-0.1%, +0.5%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                               9925.19      9938.45         13.26           0.13%                  [-0.4%, +0.5%]
std::vector<int>::insert(middle)_(cheap_elements)/32                                                                       13.42        13.42         -0.00          -0.02%                  [-0.3%, +0.1%]
std::vector<int>::insert(middle)_(cheap_elements)/8192                                                                    169.53       169.19         -0.34          -0.20%                  [-1.0%, +0.9%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/32                                                                5.24         4.79         -0.45          -8.55%        x         [-10.9%, -3.8%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/8192                                                            697.79       693.90         -3.89          -0.56%                  [-2.3%, +3.8%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/32                                                                81.03        81.04          0.00           0.01%                  [-1.4%, +3.2%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/8192                                                            6201.31      6200.13         -1.18          -0.02%                  [-0.6%, +0.7%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/32                                                          27.98        27.94         -0.03          -0.12%                  [-0.8%, +0.1%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/8192                                                         0.90         0.83         -0.06          -6.84%        x         [-12.7%, -2.6%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/32                                                            0.70         0.78          0.08          11.77%        x         [+11.3%, +12.2%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/8192                                                          0.70         0.78          0.08          11.30%        x         [+10.8%, +11.9%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/32                                       822.82       826.78          3.95           0.48%                  [-0.1%, +1.0%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/8192                                    7808.87      8136.26        327.39           4.19%                  [-3.4%, +10.2%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/32                                  1514.66      1499.29        -15.38          -1.02%                  [-2.5%, +0.9%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/8192                              175961.01    178070.02       2109.01           1.20%                  [-1.9%, +2.0%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                              54.90        49.49         -5.41          -9.86%        x         [-10.2%, -8.0%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                         13326.63     11176.24      -2150.39         -16.14%        x         [-20.4%, -14.4%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32                         249.43       223.39        -26.03         -10.44%                  [-15.3%, +9.7%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192                     93466.95     84790.00      -8676.95          -9.28%        x         [-11.8%, -1.0%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                     51.40        50.86         -0.55          -1.06%                  [-2.5%, +0.6%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                11612.73     11709.32         96.59           0.83%                  [-1.0%, +4.2%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                               1087.11      1079.41         -7.71          -0.71%                  [-1.5%, +1.1%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                                          1223567.79   1220753.52      -2814.27          -0.23%                  [-0.8%, +1.1%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/32                                                                  51.57        51.74          0.17           0.33%                  [-0.8%, +1.9%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/8192                                                             11780.50     12131.95        351.45           2.98%                  [-3.7%, +4.9%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/32                                                            1078.52      1079.25          0.73           0.07%                  [-1.6%, +1.5%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/8192                                                       1303776.39   1301108.90      -2667.48          -0.20%                  [-1.5%, +0.5%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/32                                                            52.88        51.70         -1.18          -2.23%                  [-5.2%, +0.5%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/8192                                                       12087.27     11668.29       -418.97          -3.47%                  [-5.5%, +3.3%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/32                                                      1072.18      1079.99          7.81           0.73%                  [-9.8%, +5.7%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/8192                                                 1304439.20   1302654.79      -1784.42          -0.14%                  [-2.3%, +1.0%]
std::vector<std::string>::ctor(size_type)/32                                                                               30.68        30.89          0.21           0.68%                  [-3.2%, +8.3%]
std::vector<std::string>::ctor(size_type)/8192                                                                           5028.92      5036.91          7.99           0.16%                  [-8.4%, +4.9%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                           47.15        47.41          0.26           0.55%                  [-2.1%, +6.3%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                       8495.27      8464.33        -30.93          -0.36%                  [-1.5%, +0.8%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                                     1173.82      1155.48        -18.33          -1.56%                  [-5.9%, +8.8%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                                1281079.20   1297138.80      16059.61           1.25%                  [-0.8%, +4.5%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/32                                                               35.11        35.98          0.87           2.48%                  [-5.3%, +6.3%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/8192                                                           8428.84      8435.98          7.14           0.08%                  [-0.7%, +0.8%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/32                                                           57.52        56.63         -0.89          -1.55%                  [-7.8%, +9.5%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/8192                                                       8461.67      8462.65          0.97           0.01%                  [-3.0%, +1.5%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/32                                                              19.08        19.30          0.21           1.12%                  [-21.7%, +22.5%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/8192                                                          4220.02      4215.08         -4.93          -0.12%                  [-1.5%, +0.9%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/32                                                          35.80        35.89          0.10           0.27%                  [-2.3%, +1.1%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/8192                                                      4240.83      4244.81          3.98           0.09%                  [-0.5%, +0.5%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/32                                                     95.48        93.45         -2.03          -2.13%                  [-6.0%, +5.2%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/8192                                                41308.99     41068.96       -240.03          -0.58%                  [-5.0%, +8.0%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/32                                                157.42       157.85          0.43           0.27%                  [-2.8%, +2.8%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/8192                                            19148.32     18637.18       -511.14          -2.67%                  [-14.3%, +4.0%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/32                                               29.45        29.46          0.01           0.02%                  [-1.2%, +2.4%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/8192                                              1.93         2.11          0.18           9.26%                  [-57.0%, +37.7%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/32                                           51.28        50.21         -1.07          -2.08%                  [-6.0%, +0.2%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/8192                                         22.43        22.79          0.36           1.62%                  [-1.2%, +3.0%]
std::vector<std::string>::emplace_back()_(with_reserve)_(cheap_elements)                                                    0.10         0.10          0.00           0.93%        x         [+0.5%, +1.3%]
std::vector<std::string>::emplace_back()_(with_reserve)_(expensive_elements)                                                0.18         0.18         -0.00          -0.13%                  [-1.6%, +2.8%]
std::vector<std::string>::erase(begin)_(cheap_elements)/32                                                                 17.56        16.70         -0.86          -4.92%                  [-6.7%, +2.8%]
std::vector<std::string>::erase(begin)_(cheap_elements)/8192                                                             3299.19      3305.20          6.02           0.18%                  [-0.4%, +0.6%]
std::vector<std::string>::erase(begin)_(expensive_elements)/32                                                             30.16        29.75         -0.41          -1.37%                  [-8.7%, +4.0%]
std::vector<std::string>::erase(begin)_(expensive_elements)/8192                                                         3301.48      3332.10         30.62           0.93%                  [-5.7%, +12.1%]
std::vector<std::string>::erase(middle)_(cheap_elements)/32                                                                14.75        13.20         -1.55         -10.53%                  [-12.1%, +3.2%]
std::vector<std::string>::erase(middle)_(cheap_elements)/8192                                                            1659.38      1659.43          0.05           0.00%                  [-0.2%, +0.4%]
std::vector<std::string>::erase(middle)_(expensive_elements)/32                                                            26.48        26.67          0.19           0.73%                  [-2.7%, +5.2%]
std::vector<std::string>::erase(middle)_(expensive_elements)/8192                                                        1662.30      1666.35          4.06           0.24%                  [-0.2%, +0.8%]
std::vector<std::string>::insert(begin)_(cheap_elements)/32                                                                35.35        35.17         -0.18          -0.52%                  [-5.6%, +5.4%]
std::vector<std::string>::insert(begin)_(cheap_elements)/8192                                                            8424.02      8427.94          3.91           0.05%                  [-1.1%, +1.8%]
std::vector<std::string>::insert(begin)_(expensive_elements)/32                                                            57.99        57.24         -0.75          -1.29%                  [-8.0%, +9.8%]
std::vector<std::string>::insert(begin)_(expensive_elements)/8192                                                        8473.23      8492.71         19.48           0.23%                  [-0.4%, +0.9%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                         937.96       938.84          0.88           0.09%                  [-0.8%, +0.6%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                     26838.74     27072.69        233.94           0.87%                  [-2.3%, +4.1%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32                    1588.91      1591.84          2.93           0.18%                  [-1.9%, +1.9%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192                340840.94    337340.33      -3500.61          -1.03%                  [-1.9%, +0.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                          1041.64      1031.62        -10.02          -0.96%                  [-2.8%, +2.6%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                       40526.41     41202.49        676.07           1.67%                  [-1.1%, +3.0%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32                      1690.25      1716.44         26.19           1.55%                  [-1.4%, +2.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192                 1214905.68   1219973.09       5067.41           0.42%                  [-0.9%, +1.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                         1091.39      1107.02         15.64           1.43%                  [-1.4%, +3.0%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                      29763.98     29415.03       -348.95          -1.17%                  [-3.9%, +0.3%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32                     1783.61      1790.65          7.04           0.39%                  [-2.9%, +1.8%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192                 198392.81    195524.00      -2868.82          -1.45%                  [-3.7%, +0.8%]
std::vector<std::string>::insert(middle)_(cheap_elements)/32                                                               19.24        19.21         -0.03          -0.18%                  [-21.7%, +22.8%]
std::vector<std::string>::insert(middle)_(cheap_elements)/8192                                                           4221.14      4215.89         -5.25          -0.12%                  [-0.6%, +0.5%]
std::vector<std::string>::insert(middle)_(expensive_elements)/32                                                           35.70        36.12          0.42           1.16%                  [-0.5%, +2.4%]
std::vector<std::string>::insert(middle)_(expensive_elements)/8192                                                       4237.66      4251.58         13.92           0.33%                  [-0.3%, +0.8%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/32                                                       35.19        35.30          0.11           0.30%                  [-0.8%, +1.1%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/8192                                                   8824.93      8671.80       -153.13          -1.74%                  [-7.0%, +1.8%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/32                                                  205.59       200.25         -5.34          -2.60%                  [-23.2%, +15.3%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/8192                                              79597.28     80087.74        490.46           0.62%                  [-10.7%, +9.3%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/32                                                        93.19        92.38         -0.81          -0.87%                  [-6.5%, +8.4%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/8192                                                   41119.26     41334.73        215.47           0.52%                  [-6.1%, +7.9%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/32                                                   157.92       156.05         -1.87          -1.19%                  [-2.9%, +3.5%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/8192                                               18975.01     18448.38       -526.63          -2.78%                  [-15.0%, +3.3%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/32                                                  29.34        29.41          0.07           0.25%                  [-1.6%, +3.6%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/8192                                                 1.95         2.09          0.14           7.34%                  [-56.7%, +36.4%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/32                                              50.81        50.55         -0.26          -0.51%                  [-4.5%, +1.5%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/8192                                            22.87        22.64         -0.22          -0.98%        x         [-1.7%, -0.0%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/32                                                    1.79         1.45         -0.34         -19.17%        x         [-19.8%, -18.7%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/8192                                                  1.79         1.46         -0.33         -18.64%                  [-32.0%, +1.8%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/32                                               34.91        35.27          0.36           1.04%                  [-0.3%, +2.8%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/8192                                             33.91        33.97          0.06           0.18%                  [-2.6%, +1.3%]
Geomean                                                                                                                   497.45       495.09         -2.36          -0.48%

Benchmark results for macos-26.5-arm64-20260812:
Benchmark                                                                                                               Baseline    Candidate    Difference    % Difference   Significant?   95% C.I. of %diff
--------------------------------------------------------------------------------------------------------------------  ----------  -----------  ------------  --------------  --------------  -------------------
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/32                          369.76       370.86          1.10           0.30%                  [-1.2%, +1.3%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/8192                       4481.76      4465.31        -16.45          -0.37%                  [-1.9%, +1.2%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/32                      770.52       771.95          1.43           0.19%                  [-5.6%, +5.2%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/8192                  99584.23    100697.82       1113.59           1.12%                  [-0.8%, +2.7%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                 20.24        20.28          0.03           0.17%                  [-0.4%, +1.0%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192             5032.54      5028.22         -4.32          -0.09%                  [-0.8%, +0.5%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32            148.12       144.00         -4.12          -2.78%                  [-15.3%, +4.6%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192        54014.74     54259.63        244.90           0.45%                  [-0.3%, +1.0%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                        36.89        36.84         -0.05          -0.14%                  [-1.4%, +2.0%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                    6701.50      6727.98         26.47           0.39%                  [-0.0%, +1.1%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                   696.15       698.26          2.11           0.30%                  [-1.4%, +4.9%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                              167737.67    169169.50       1431.82           0.85%                  [-1.4%, +3.2%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/32                                                     36.47        36.73          0.25           0.69%                  [-3.0%, +2.7%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/8192                                                 6692.61      6737.40         44.80           0.67%                  [-0.3%, +1.4%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/32                                                689.69       683.17         -6.52          -0.95%                  [-2.7%, +1.1%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/8192                                           170793.52    168937.05      -1856.47          -1.09%                  [-7.2%, +3.1%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/32                                               37.50        37.16         -0.34          -0.91%                  [-1.4%, +2.2%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/8192                                           6701.10      6765.46         64.37           0.96%                  [-0.8%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/32                                          677.31       679.41          2.10           0.31%                  [-3.6%, +1.4%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/8192                                     168079.49    169019.35        939.85           0.56%                  [-2.4%, +6.5%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/32                                                                  31.03        31.30          0.27           0.86%                  [-1.4%, +3.0%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/8192                                                              3749.17      3730.16        -19.01          -0.51%                  [-2.8%, +3.3%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                              35.50        35.26         -0.24          -0.68%                  [-1.7%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                          5478.71      5464.22        -14.48          -0.26%                  [-1.7%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                         638.98       638.72         -0.25          -0.04%                  [-3.1%, +2.7%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                    166505.45    167854.73       1349.28           0.81%                  [-1.9%, +3.0%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/32                                                  20.37        20.49          0.11           0.56%                  [-0.5%, +0.9%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/8192                                              4849.86      4857.41          7.55           0.16%                  [-0.9%, +2.1%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/32                                              39.80        40.33          0.53           1.33%        x         [+0.7%, +2.4%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/8192                                          4887.07      5123.73        236.67           4.84%        x         [+1.4%, +6.4%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/32                                                 11.22        11.21         -0.01          -0.12%                  [-1.1%, +0.6%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/8192                                             2365.92      2356.14         -9.78          -0.41%                  [-1.1%, +0.3%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/32                                             29.54        29.15         -0.39          -1.33%                  [-3.2%, +0.4%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/8192                                         2391.71      2384.64         -7.07          -0.30%                  [-0.6%, +0.3%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/32                                        50.53        52.62          2.10           4.15%        x         [+1.7%, +5.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/8192                                    7793.80      7789.84         -3.96          -0.05%                  [-1.1%, +0.8%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/32                                    69.91        69.87         -0.04          -0.06%                  [-2.0%, +1.6%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/8192                                9048.38      9054.94          6.56           0.07%                  [-5.1%, +3.5%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/32                                  14.93        15.06          0.13           0.86%                  [-0.7%, +2.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/8192                                 1.64         1.73          0.09           5.44%        x         [+4.5%, +6.8%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/32                              27.06        27.41          0.36           1.31%        x         [+0.7%, +2.9%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/8192                            13.41        13.65          0.24           1.82%                  [-5.3%, +5.1%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(cheap_elements)                                       0.05         0.05          0.00           0.28%                  [-0.5%, +1.7%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(expensive_elements)                                   0.09         0.09         -0.00          -0.64%                  [-2.6%, +2.4%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/32                                                    21.00        20.94         -0.06          -0.27%                  [-1.6%, +0.6%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/8192                                                4681.74      4693.83         12.09           0.26%                  [-0.4%, +1.8%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/32                                                37.09        35.93         -1.17          -3.14%        x         [-4.3%, -2.6%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/8192                                            4947.93      4944.42         -3.51          -0.07%                  [-1.2%, +0.5%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/32                                                   11.69        11.65         -0.04          -0.34%                  [-1.5%, +0.9%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/8192                                               2291.08      2293.77          2.69           0.12%                  [-0.8%, +1.1%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/32                                               27.79        26.62         -1.17          -4.22%        x         [-7.1%, -1.3%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/8192                                           2291.52      2298.27          6.75           0.29%                  [-0.3%, +0.6%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/32                                                   20.42        20.41         -0.01          -0.03%                  [-0.6%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/8192                                               4861.35      4860.84         -0.51          -0.01%                  [-0.7%, +0.5%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/32                                               40.23        40.43          0.20           0.49%                  [-0.6%, +1.9%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/8192                                           4902.66      4876.20        -26.46          -0.54%                  [-1.0%, +1.0%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32            440.24       433.48         -6.75          -1.53%                  [-3.0%, +0.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192        14371.02     14156.90       -214.12          -1.49%                  [-2.2%, +0.1%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32        824.57       821.59         -2.98          -0.36%                  [-4.8%, +2.5%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192   108087.21    108736.54        649.33           0.60%                  [-0.7%, +2.1%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32              507.38       505.01         -2.37          -0.47%                  [-2.2%, +0.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192          29996.79     29888.73       -108.06          -0.36%                  [-0.8%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32          903.91       892.86        -11.04          -1.22%                  [-4.1%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192     126566.82    125891.34       -675.47          -0.53%                  [-2.9%, +1.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32             563.99       560.95         -3.04          -0.54%                  [-1.0%, +0.1%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192         16579.42     17890.70       1311.28           7.91%        x         [+7.5%, +9.0%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32         946.81       952.92          6.11           0.65%                  [-1.9%, +3.2%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192    120686.03    113035.78      -7650.25          -6.34%                  [-12.5%, +2.2%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/32                                                  11.26        11.24         -0.02          -0.20%                  [-0.4%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/8192                                              2359.74      2358.24         -1.51          -0.06%                  [-0.5%, +0.9%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/32                                              29.75        29.34         -0.40          -1.36%                  [-2.8%, +2.1%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/8192                                          2390.15      2379.68        -10.47          -0.44%                  [-0.8%, +0.8%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/32                                          16.30        16.35          0.05           0.29%                  [-0.6%, +1.1%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/8192                                      4557.75      4576.35         18.60           0.41%                  [-0.7%, +1.4%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/32                                     142.12       140.44         -1.68          -1.18%        x         [-3.4%, -0.3%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/8192                                 53594.32     53874.22        279.90           0.52%                  [-0.7%, +1.1%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/32                                           51.37        52.14          0.77           1.49%        x         [+0.4%, +3.6%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/8192                                       7808.97      7798.57        -10.40          -0.13%                  [-0.8%, +1.0%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/32                                       69.78        69.38         -0.39          -0.56%                  [-1.0%, +0.3%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/8192                                   9033.97      9015.00        -18.97          -0.21%                  [-4.6%, +4.2%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/32                                     14.92        15.11          0.19           1.27%        x         [+0.7%, +1.7%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/8192                                    1.65         1.72          0.08           4.61%        x         [+3.1%, +5.4%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/32                                 27.11        27.42          0.30           1.12%                  [-1.1%, +3.3%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/8192                               13.37        13.65          0.28           2.08%                  [-9.3%, +7.5%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/32                                       0.74         0.80          0.06           7.54%        x         [+6.0%, +10.7%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/8192                                     0.74         0.79          0.05           6.85%        x         [+5.2%, +11.4%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/32                                  18.97        19.22          0.25           1.32%                  [-0.8%, +3.7%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/8192                                19.31        19.45          0.14           0.74%                  [-1.9%, +3.0%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/32                                               354.92       352.86         -2.06          -0.58%                  [-2.2%, +0.9%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/8192                                             829.46       793.00        -36.46          -4.40%        x         [-9.4%, -2.4%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                                       1.81         1.79         -0.02          -0.85%                  [-1.4%, +0.7%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                                   565.51       533.53        -31.98          -5.66%                  [-29.7%, +24.1%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                             13.36        14.18          0.82           6.11%                  [-5.2%, +17.6%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                          823.86       790.18        -33.68          -4.09%                  [-18.3%, +8.9%]
std::vector<int>::ctor(Range)_(cheap_elements)/32                                                                          13.56        13.71          0.15           1.10%                  [-3.9%, +13.3%]
std::vector<int>::ctor(Range)_(cheap_elements)/8192                                                                       789.70       816.01         26.31           3.33%                  [-22.3%, +9.4%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/32                                                                    13.06        13.33          0.27           2.08%                  [-12.1%, +14.9%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/8192                                                                 809.50       816.56          7.06           0.87%                  [-15.4%, +8.3%]
std::vector<int>::ctor(size_type)/32                                                                                       13.22        13.27          0.05           0.38%                  [-6.8%, +8.7%]
std::vector<int>::ctor(size_type)/8192                                                                                    539.38       549.69         10.31           1.91%                  [-5.4%, +4.7%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                                   14.73        13.03         -1.71         -11.57%                  [-22.7%, +13.4%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                                363.28       396.42         33.15           9.12%                  [-14.5%, +18.3%]
std::vector<int>::emplace(begin)_(cheap_elements)/32                                                                        4.43         4.18         -0.25          -5.60%        x         [-7.1%, -1.6%]
std::vector<int>::emplace(begin)_(cheap_elements)/8192                                                                    292.07       291.58         -0.50          -0.17%                  [-1.2%, +1.2%]
std::vector<int>::emplace(middle)_(cheap_elements)/32                                                                       4.99         5.11          0.11           2.30%                  [-2.5%, +8.2%]
std::vector<int>::emplace(middle)_(cheap_elements)/8192                                                                   139.45       141.35          1.90           1.36%                  [-1.1%, +2.6%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/32                                                             23.55        23.72          0.17           0.73%                  [-1.2%, +3.4%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/8192                                                          548.42       561.12         12.70           2.32%                  [-0.9%, +3.7%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/32                                                       13.66        13.53         -0.14          -0.99%                  [-1.5%, +1.3%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/8192                                                      0.37         0.36         -0.00          -0.51%                  [-1.6%, +0.8%]
std::vector<int>::emplace_back()_(with_reserve)_(cheap_elements)                                                            0.04         0.04         -0.00          -0.01%                  [-1.4%, +1.1%]
std::vector<int>::erase(begin)_(cheap_elements)/32                                                                          4.05         3.97         -0.07          -1.85%                  [-4.5%, +0.7%]
std::vector<int>::erase(begin)_(cheap_elements)/8192                                                                      286.84       286.58         -0.26          -0.09%                  [-1.2%, +0.3%]
std::vector<int>::erase(middle)_(cheap_elements)/32                                                                         4.47         4.48          0.02           0.35%                  [-0.7%, +1.1%]
std::vector<int>::erase(middle)_(cheap_elements)/8192                                                                     138.97       139.27          0.30           0.21%                  [-2.6%, +3.0%]
std::vector<int>::insert(begin)_(cheap_elements)/32                                                                         4.46         4.18         -0.28          -6.22%        x         [-7.5%, -5.1%]
std::vector<int>::insert(begin)_(cheap_elements)/8192                                                                     291.26       293.06          1.81           0.62%                  [-0.6%, +1.8%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                                 388.88       386.20         -2.68          -0.69%                  [-2.5%, +1.3%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                              1497.69      1498.27          0.58           0.04%                  [-2.1%, +1.4%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                                   418.61       414.41         -4.20          -1.00%                  [-3.0%, +0.6%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                                3689.58      3657.75        -31.83          -0.86%                  [-2.0%, +0.2%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                                  365.61       366.15          0.55           0.15%                  [-1.5%, +1.4%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                               1206.86      1203.34         -3.52          -0.29%                  [-1.4%, +0.7%]
std::vector<int>::insert(middle)_(cheap_elements)/32                                                                        5.05         5.01         -0.04          -0.77%                  [-7.4%, +5.3%]
std::vector<int>::insert(middle)_(cheap_elements)/8192                                                                    142.20       140.20         -2.01          -1.41%                  [-2.4%, +1.4%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/32                                                                2.05         2.06          0.01           0.28%                  [-0.4%, +0.6%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/8192                                                            387.76       337.93        -49.83         -12.85%                  [-32.1%, +11.9%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/32                                                                23.69        23.53         -0.17          -0.71%                  [-2.4%, +4.2%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/8192                                                             547.52       560.80         13.28           2.43%                  [-1.1%, +4.3%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/32                                                          13.51        13.45         -0.07          -0.50%                  [-2.2%, +1.4%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/8192                                                         0.36         0.36          0.00           0.35%                  [-0.7%, +1.7%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/32                                                            0.29         0.30          0.00           0.91%        x         [+0.4%, +3.3%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/8192                                                          0.29         0.29         -0.00          -0.58%                  [-1.9%, +0.8%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/32                                       371.54       370.74         -0.80          -0.22%                  [-1.9%, +1.2%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/8192                                    4401.21      4473.65         72.44           1.65%                  [-1.0%, +2.3%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/32                                   782.94       766.01        -16.93          -2.16%                  [-4.6%, +0.9%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/8192                               99985.91    100798.16        812.25           0.81%                  [-0.8%, +2.3%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                              20.17        20.29          0.12           0.58%                  [-0.2%, +1.0%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                          5001.80      5030.98         29.18           0.58%                  [-0.5%, +0.8%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32                         145.66       143.78         -1.88          -1.29%                  [-3.8%, +7.2%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192                     52764.48     53102.24        337.76           0.64%                  [-0.8%, +1.5%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                     36.43        36.65          0.22           0.61%                  [-1.2%, +3.2%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                 6684.42      6721.19         36.77           0.55%        x         [+0.1%, +1.6%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                                676.99       705.16         28.17           4.16%                  [-8.2%, +6.7%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                                           166314.62    165601.03       -713.59          -0.43%                  [-11.0%, +3.5%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/32                                                                  36.41        36.83          0.43           1.17%                  [-2.3%, +2.8%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/8192                                                              6673.86      6699.98         26.12           0.39%                  [-0.7%, +0.8%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/32                                                             675.31       695.35         20.04           2.97%                  [-2.0%, +7.4%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/8192                                                        165159.51    166862.20       1702.69           1.03%                  [-0.7%, +2.9%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/32                                                            36.74        36.89          0.14           0.39%                  [-1.3%, +1.7%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/8192                                                        6717.15      6700.20        -16.95          -0.25%                  [-1.6%, +1.1%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/32                                                       678.54       679.85          1.32           0.19%                  [-6.3%, +7.6%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/8192                                                  167350.18    165731.59      -1618.59          -0.97%                  [-3.7%, +0.7%]
std::vector<std::string>::ctor(size_type)/32                                                                               31.25        31.29          0.04           0.13%                  [-1.2%, +2.1%]
std::vector<std::string>::ctor(size_type)/8192                                                                           3730.50      3714.96        -15.54          -0.42%                  [-3.3%, +2.0%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                           35.67        35.63         -0.04          -0.13%                  [-2.1%, +3.0%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                       5491.87      5513.44         21.57           0.39%                  [-2.7%, +2.4%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                                      630.93       646.86         15.93           2.52%                  [-2.4%, +7.8%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                                 164049.22    162949.12      -1100.10          -0.67%                  [-6.3%, +2.9%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/32                                                               20.62        20.58         -0.04          -0.20%                  [-1.0%, +0.6%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/8192                                                           4866.58      4855.46        -11.12          -0.23%                  [-0.9%, +0.3%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/32                                                           40.50        40.73          0.24           0.59%                  [-3.3%, +3.0%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/8192                                                       4854.48      4898.56         44.08           0.91%                  [-0.2%, +1.6%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/32                                                              11.21        11.23          0.02           0.17%                  [-0.2%, +0.9%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/8192                                                          2347.44      2359.39         11.94           0.51%        x         [+0.2%, +0.9%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/32                                                          29.43        29.03         -0.40          -1.36%                  [-3.1%, +1.8%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/8192                                                      2381.02      2376.64         -4.37          -0.18%                  [-0.8%, +0.8%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/32                                                     45.69        43.16         -2.52          -5.53%        x         [-6.4%, -3.5%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/8192                                                 2281.23      2279.46         -1.77          -0.08%                  [-2.1%, +1.3%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/32                                                 62.98        62.98          0.00           0.01%                  [-0.9%, +2.1%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/8192                                             5098.40      5087.94        -10.47          -0.21%                  [-8.2%, +4.5%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/32                                               15.00        15.10          0.10           0.66%                  [-1.1%, +1.7%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/8192                                              1.07         1.17          0.10           9.21%        x         [+7.6%, +10.0%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/32                                           27.55        27.45         -0.10          -0.37%                  [-2.0%, +1.6%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/8192                                         12.81        13.04          0.24           1.85%        x         [+1.0%, +3.6%]
std::vector<std::string>::emplace_back()_(with_reserve)_(cheap_elements)                                                    0.05         0.05         -0.00          -0.44%                  [-1.8%, +0.4%]
std::vector<std::string>::emplace_back()_(with_reserve)_(expensive_elements)                                                0.09         0.09          0.00           1.15%                  [-1.1%, +2.8%]
std::vector<std::string>::erase(begin)_(cheap_elements)/32                                                                  9.04         9.33          0.29           3.17%        x         [+0.6%, +5.0%]
std::vector<std::string>::erase(begin)_(cheap_elements)/8192                                                             2751.96      2747.40         -4.56          -0.17%                  [-1.1%, +1.0%]
std::vector<std::string>::erase(begin)_(expensive_elements)/32                                                             26.94        26.81         -0.13          -0.49%                  [-3.9%, +1.1%]
std::vector<std::string>::erase(begin)_(expensive_elements)/8192                                                         2776.35      2775.58         -0.78          -0.03%                  [-1.0%, +3.1%]
std::vector<std::string>::erase(middle)_(cheap_elements)/32                                                                 5.77         6.33          0.56           9.73%                  [-3.9%, +14.2%]
std::vector<std::string>::erase(middle)_(cheap_elements)/8192                                                             865.16       861.23         -3.93          -0.45%                  [-1.3%, +0.4%]
std::vector<std::string>::erase(middle)_(expensive_elements)/32                                                            24.18        23.64         -0.54          -2.24%                  [-3.9%, +2.2%]
std::vector<std::string>::erase(middle)_(expensive_elements)/8192                                                         878.73       877.12         -1.61          -0.18%                  [-0.9%, +1.2%]
std::vector<std::string>::insert(begin)_(cheap_elements)/32                                                                20.56        20.60          0.03           0.16%                  [-0.5%, +0.9%]
std::vector<std::string>::insert(begin)_(cheap_elements)/8192                                                            4828.67      4852.53         23.86           0.49%                  [-0.2%, +1.1%]
std::vector<std::string>::insert(begin)_(expensive_elements)/32                                                            40.46        40.19         -0.27          -0.66%                  [-1.6%, +1.8%]
std::vector<std::string>::insert(begin)_(expensive_elements)/8192                                                        4859.22      4864.69          5.47           0.11%                  [-1.2%, +2.1%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                         421.08       420.64         -0.44          -0.10%                  [-2.5%, +1.7%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                      9772.22      9711.79        -60.43          -0.62%                  [-1.3%, +0.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32                     799.30       802.07          2.78           0.35%                  [-0.4%, +1.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192                103435.99    102969.83       -466.16          -0.45%                  [-8.5%, +6.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                           485.79       484.77         -1.02          -0.21%                  [-2.1%, +1.8%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                       19953.06     20008.58         55.52           0.28%                  [-1.0%, +1.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32                       875.00       871.56         -3.44          -0.39%                  [-1.7%, +0.7%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192                  114520.72    114977.10        456.38           0.40%                  [-3.2%, +3.6%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                          510.95       511.82          0.87           0.17%                  [-0.8%, +0.9%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                      11106.54     11096.95         -9.59          -0.09%                  [-1.4%, +0.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32                      868.58       882.61         14.03           1.62%                  [-2.4%, +2.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192                 105385.39    104788.43       -596.96          -0.57%                  [-5.7%, +10.9%]
std::vector<std::string>::insert(middle)_(cheap_elements)/32                                                               11.25        11.25         -0.00          -0.02%                  [-0.8%, +0.7%]
std::vector<std::string>::insert(middle)_(cheap_elements)/8192                                                           2368.54      2350.71        -17.83          -0.75%                  [-1.1%, +0.1%]
std::vector<std::string>::insert(middle)_(expensive_elements)/32                                                           29.49        29.50          0.01           0.02%                  [-2.6%, +2.9%]
std::vector<std::string>::insert(middle)_(expensive_elements)/8192                                                       2393.58      2382.36        -11.22          -0.47%                  [-1.0%, +0.4%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/32                                                       34.67        34.18         -0.49          -1.42%                  [-2.1%, +0.5%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/8192                                                   7635.20      7589.60        -45.59          -0.60%                  [-1.9%, +0.5%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/32                                                  135.12       135.74          0.63           0.46%                  [-23.2%, +7.6%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/8192                                              51741.20     52427.61        686.41           1.33%                  [-0.1%, +2.3%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/32                                                        45.54        43.74         -1.80          -3.96%        x         [-5.8%, -1.4%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/8192                                                    2292.82      2290.03         -2.79          -0.12%                  [-2.6%, +2.4%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/32                                                    61.82        63.29          1.47           2.38%        x         [+1.0%, +3.6%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/8192                                                5100.27      5102.51          2.23           0.04%                  [-10.8%, +5.3%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/32                                                  15.00        15.07          0.08           0.51%                  [-0.6%, +1.2%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/8192                                                 1.07         1.17          0.09           8.46%        x         [+7.2%, +9.1%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/32                                              27.79        27.67         -0.12          -0.44%                  [-1.7%, +1.1%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/8192                                            12.70        12.90          0.21           1.64%        x         [+0.6%, +3.5%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/32                                                    0.69         0.76          0.08          11.33%        x         [+10.7%, +12.5%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/8192                                                  0.69         0.76          0.08          11.01%        x         [+6.0%, +13.4%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/32                                               18.73        19.07          0.34           1.83%                  [-4.0%, +9.0%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/8192                                             19.03        19.15          0.12           0.64%                  [-1.9%, +3.5%]
Geomean                                                                                                                   251.24       251.91          0.67           0.27%

Benchmark results for macos-26.5-arm64-hardenedfast-20260821:
Benchmark                                                                                                               Baseline    Candidate    Difference    % Difference   Significant?   95% C.I. of %diff
--------------------------------------------------------------------------------------------------------------------  ----------  -----------  ------------  --------------  --------------  -------------------
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/32                          382.75       379.52         -3.22          -0.84%        x         [-1.3%, -0.1%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(cheap_elements)/8192                       4550.16      4525.22        -24.94          -0.55%                  [-2.6%, +1.7%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/32                      799.07       783.56        -15.51          -1.94%                  [-7.1%, +3.5%]
std::vector<NothrowMoveConstructible>::append_range()_(into_empty_container)_(expensive_elements)/8192                 102348.82    101969.93       -378.89          -0.37%                  [-5.2%, +9.8%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                 21.41        20.69         -0.72          -3.37%                  [-24.8%, +4.2%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192             5107.92      5105.18         -2.74          -0.05%                  [-0.5%, +0.6%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32            145.56       147.30          1.74           1.19%                  [-6.8%, +5.1%]
std::vector<NothrowMoveConstructible>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192        55454.61     55827.61        373.00           0.67%                  [-1.0%, +1.6%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                        37.58        37.63          0.06           0.15%                  [-2.4%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                    6991.70      6919.98        -71.71          -1.03%                  [-1.7%, +0.0%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                   702.97       707.34          4.36           0.62%                  [-2.3%, +2.1%]
std::vector<NothrowMoveConstructible>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                              174653.29    172009.75      -2643.53          -1.51%                  [-10.0%, +3.2%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/32                                                     38.18        37.39         -0.79          -2.08%        x         [-2.7%, -1.0%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(cheap_elements)/8192                                                 6973.08      7007.31         34.22           0.49%                  [-1.9%, +1.4%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/32                                                703.79       705.43          1.64           0.23%                  [-6.2%, +4.5%]
std::vector<NothrowMoveConstructible>::ctor(Range)_(expensive_elements)/8192                                           172743.09    171289.96      -1453.13          -0.84%                  [-5.0%, +2.7%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/32                                               37.97        37.83         -0.14          -0.38%                  [-3.4%, +1.3%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(cheap_elements)/8192                                           6941.76      6955.51         13.75           0.20%                  [-0.5%, +1.8%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/32                                          704.11       714.23         10.12           1.44%                  [-1.6%, +4.4%]
std::vector<NothrowMoveConstructible>::ctor(const_Self&)_(expensive_elements)/8192                                     173644.93    173986.84        341.91           0.20%                  [-8.4%, +6.2%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/32                                                                  32.69        31.33         -1.36          -4.16%        x         [-5.8%, -2.0%]
std::vector<NothrowMoveConstructible>::ctor(size_type)/8192                                                              3842.22      3985.68        143.46           3.73%                  [-1.1%, +8.2%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                              36.58        36.56         -0.02          -0.05%                  [-4.6%, +2.2%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                          5767.32      5740.77        -26.55          -0.46%                  [-7.8%, +2.1%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                         660.78       655.66         -5.12          -0.77%                  [-4.7%, +2.6%]
std::vector<NothrowMoveConstructible>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                    171001.87    171673.35        671.48           0.39%                  [-1.7%, +3.0%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/32                                                  20.79        20.80          0.01           0.07%                  [-0.6%, +0.4%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(cheap_elements)/8192                                              4949.16      4975.61         26.45           0.53%                  [-0.5%, +1.0%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/32                                              41.20        41.44          0.24           0.58%                  [-1.6%, +2.8%]
std::vector<NothrowMoveConstructible>::emplace(begin)_(expensive_elements)/8192                                          4992.14      4972.90        -19.23          -0.39%                  [-1.1%, +0.4%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/32                                                 11.38        11.38         -0.00          -0.01%                  [-0.4%, +0.4%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(cheap_elements)/8192                                             2408.68      2409.95          1.27           0.05%                  [-0.5%, +0.6%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/32                                             30.47        29.84         -0.64          -2.09%                  [-4.4%, +3.0%]
std::vector<NothrowMoveConstructible>::emplace(middle)_(expensive_elements)/8192                                         2436.71      2428.67         -8.04          -0.33%                  [-0.8%, +0.7%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/32                                        51.80        52.28          0.48           0.93%                  [-0.8%, +4.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(cheap_elements)/8192                                    7959.12      7874.41        -84.70          -1.06%                  [-2.0%, +1.2%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/32                                    71.46        71.31         -0.15          -0.21%                  [-2.3%, +1.1%]
std::vector<NothrowMoveConstructible>::emplace_back()_(growing)_(expensive_elements)/8192                                9089.78      9094.56          4.78           0.05%                  [-4.0%, +3.9%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/32                                  16.24        16.29          0.05           0.32%                  [-1.3%, +2.0%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(cheap_elements)/8192                                 2.77         2.80          0.03           0.97%                  [-0.3%, +2.3%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/32                              28.42        27.92         -0.50          -1.74%                  [-4.4%, +7.1%]
std::vector<NothrowMoveConstructible>::emplace_back()_(many_elements)_(expensive_elements)/8192                            13.98        13.88         -0.10          -0.72%                  [-11.4%, +5.2%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(cheap_elements)                                       0.05         0.05          0.00           0.69%                  [-0.4%, +2.2%]
std::vector<NothrowMoveConstructible>::emplace_back()_(with_reserve)_(expensive_elements)                                   0.10         0.09         -0.00          -0.52%                  [-1.4%, +1.5%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/32                                                    21.66        21.62         -0.04          -0.18%                  [-0.7%, +0.5%]
std::vector<NothrowMoveConstructible>::erase(begin)_(cheap_elements)/8192                                                4832.29      4855.46         23.17           0.48%                  [-0.6%, +1.8%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/32                                                37.14        36.61         -0.53          -1.42%        x         [-3.5%, -0.1%]
std::vector<NothrowMoveConstructible>::erase(begin)_(expensive_elements)/8192                                            5098.95      5089.34         -9.60          -0.19%                  [-1.6%, +0.9%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/32                                                   12.30        12.29         -0.01          -0.06%                  [-1.0%, +1.1%]
std::vector<NothrowMoveConstructible>::erase(middle)_(cheap_elements)/8192                                               2343.91      2353.95         10.04           0.43%                  [-0.1%, +0.9%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/32                                               28.26        26.50         -1.77          -6.25%        x         [-7.7%, -2.7%]
std::vector<NothrowMoveConstructible>::erase(middle)_(expensive_elements)/8192                                           2380.02      2365.95        -14.07          -0.59%                  [-1.1%, +0.7%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/32                                                   20.76        20.76         -0.01          -0.03%                  [-0.6%, +0.2%]
std::vector<NothrowMoveConstructible>::insert(begin)_(cheap_elements)/8192                                               4961.85      4935.86        -25.99          -0.52%                  [-1.1%, +0.3%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/32                                               41.66        41.05         -0.61          -1.47%                  [-3.7%, +1.5%]
std::vector<NothrowMoveConstructible>::insert(begin)_(expensive_elements)/8192                                           4961.86      4967.41          5.55           0.11%                  [-0.5%, +0.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32            450.59       452.25          1.66           0.37%                  [-0.7%, +3.7%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192        15098.88     15076.06        -22.82          -0.15%                  [-1.5%, +1.9%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32        839.14       848.48          9.34           1.11%                  [-7.8%, +6.2%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192   109725.89    111878.34       2152.45           1.96%                  [-5.2%, +12.0%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32              521.82       524.53          2.70           0.52%                  [-0.6%, +2.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192          31086.10     32542.98       1456.88           4.69%        x         [+3.8%, +6.1%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32          923.67       926.98          3.31           0.36%                  [-3.5%, +3.0%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192     128253.04    137512.55       9259.51           7.22%        x         [+2.6%, +10.6%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32             585.89       580.63         -5.26          -0.90%                  [-1.5%, +0.2%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192         18495.64     18526.03         30.39           0.16%                  [-0.6%, +1.0%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32         973.04       982.02          8.98           0.92%                  [-2.8%, +4.3%]
std::vector<NothrowMoveConstructible>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192    115177.62    116260.89       1083.27           0.94%                  [-3.0%, +12.3%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/32                                                  11.36        11.39          0.03           0.29%        x         [+0.1%, +1.0%]
std::vector<NothrowMoveConstructible>::insert(middle)_(cheap_elements)/8192                                              2409.10      2404.58         -4.52          -0.19%                  [-0.6%, +0.4%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/32                                              30.19        30.09         -0.09          -0.31%                  [-2.2%, +2.1%]
std::vector<NothrowMoveConstructible>::insert(middle)_(expensive_elements)/8192                                          2433.93      2442.54          8.60           0.35%                  [-0.5%, +0.8%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/32                                          16.72        16.69         -0.03          -0.18%                  [-0.7%, +0.6%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(cheap_elements)/8192                                      4655.52      4664.31          8.79           0.19%                  [-0.5%, +1.1%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/32                                     144.35       144.27         -0.08          -0.06%                  [-3.2%, +6.1%]
std::vector<NothrowMoveConstructible>::operator=(const_Self&)_(expensive_elements)/8192                                 55492.80     55559.48         66.68           0.12%                  [-1.0%, +1.2%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/32                                           51.60        52.25          0.65           1.27%                  [-0.4%, +2.8%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(cheap_elements)/8192                                       7991.37      7924.07        -67.30          -0.84%                  [-1.9%, +1.4%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/32                                       70.99        71.46          0.48           0.67%                  [-1.1%, +2.0%]
std::vector<NothrowMoveConstructible>::push_back()_(growing)_(expensive_elements)/8192                                   9051.88      9050.62         -1.26          -0.01%                  [-5.5%, +4.3%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/32                                     16.33        16.22         -0.11          -0.66%                  [-1.6%, +1.3%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(cheap_elements)/8192                                    2.77         2.79          0.03           0.99%        x         [+0.4%, +2.2%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/32                                 28.66        28.72          0.06           0.21%                  [-2.3%, +1.6%]
std::vector<NothrowMoveConstructible>::push_back()_(many_elements)_(expensive_elements)/8192                               13.88        13.89          0.00           0.03%                  [-1.3%, +1.8%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/32                                       1.79         1.83          0.04           2.17%        x         [+1.2%, +3.1%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(cheap_elements)/8192                                     1.78         1.81          0.03           1.97%        x         [+1.6%, +3.5%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/32                                  19.87        19.97          0.10           0.52%                  [-1.6%, +1.8%]
std::vector<NothrowMoveConstructible>::push_back()_(with_reserve)_(expensive_elements)/8192                                20.06        19.99         -0.07          -0.36%                  [-1.7%, +3.5%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/32                                               365.51       366.23          0.71           0.20%                  [-2.0%, +1.8%]
std::vector<int>::append_range()_(into_empty_container)_(cheap_elements)/8192                                             905.53       846.35        -59.18          -6.54%                  [-11.1%, +4.7%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                                       1.79         1.79          0.00           0.03%                  [-1.1%, +1.3%]
std::vector<int>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                                   556.14       546.03        -10.11          -1.82%                  [-22.3%, +15.2%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                             13.27        13.66          0.40           3.00%                  [-21.3%, +13.8%]
std::vector<int>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                          864.29       900.97         36.67           4.24%                  [-5.6%, +17.3%]
std::vector<int>::ctor(Range)_(cheap_elements)/32                                                                          14.03        14.35          0.31           2.24%                  [-2.5%, +9.2%]
std::vector<int>::ctor(Range)_(cheap_elements)/8192                                                                       837.70       840.02          2.32           0.28%                  [-19.5%, +13.1%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/32                                                                    13.19        12.85         -0.34          -2.58%                  [-11.1%, +9.4%]
std::vector<int>::ctor(const_Self&)_(cheap_elements)/8192                                                                 834.13       861.63         27.49           3.30%                  [-9.1%, +15.1%]
std::vector<int>::ctor(size_type)/32                                                                                       13.25        13.52          0.27           2.02%                  [-16.2%, +9.9%]
std::vector<int>::ctor(size_type)/8192                                                                                    540.46       537.86         -2.61          -0.48%                  [-22.5%, +6.1%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                                   14.62        14.43         -0.19          -1.32%                  [-25.4%, +20.5%]
std::vector<int>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                                419.74       433.87         14.13           3.37%                  [-13.0%, +19.2%]
std::vector<int>::emplace(begin)_(cheap_elements)/32                                                                        4.55         4.27         -0.28          -6.15%        x         [-6.6%, -5.6%]
std::vector<int>::emplace(begin)_(cheap_elements)/8192                                                                    300.19       301.86          1.66           0.55%        x         [+0.0%, +1.1%]
std::vector<int>::emplace(middle)_(cheap_elements)/32                                                                       6.13         5.13         -0.99         -16.22%        x         [-19.0%, -9.7%]
std::vector<int>::emplace(middle)_(cheap_elements)/8192                                                                   140.65       140.63         -0.02          -0.01%                  [-4.0%, +4.6%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/32                                                             24.73        24.55         -0.18          -0.73%                  [-4.6%, +0.9%]
std::vector<int>::emplace_back()_(growing)_(cheap_elements)/8192                                                          556.96       550.35         -6.61          -1.19%                  [-5.4%, +1.4%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/32                                                       14.04        14.10          0.06           0.42%                  [-1.3%, +2.2%]
std::vector<int>::emplace_back()_(many_elements)_(cheap_elements)/8192                                                      0.63         0.62         -0.01          -1.28%                  [-2.8%, +0.4%]
std::vector<int>::emplace_back()_(with_reserve)_(cheap_elements)                                                            0.05         0.04         -0.00          -1.22%                  [-3.4%, +1.1%]
std::vector<int>::erase(begin)_(cheap_elements)/32                                                                          4.23         4.06         -0.17          -4.12%                  [-4.5%, +0.8%]
std::vector<int>::erase(begin)_(cheap_elements)/8192                                                                      294.73       295.26          0.54           0.18%                  [-1.1%, +0.5%]
std::vector<int>::erase(middle)_(cheap_elements)/32                                                                         4.61         4.82          0.21           4.45%        x         [+3.6%, +5.6%]
std::vector<int>::erase(middle)_(cheap_elements)/8192                                                                     144.56       138.91         -5.65          -3.91%        x         [-5.1%, -1.5%]
std::vector<int>::insert(begin)_(cheap_elements)/32                                                                         4.53         4.26         -0.27          -6.04%        x         [-7.4%, -5.5%]
std::vector<int>::insert(begin)_(cheap_elements)/8192                                                                     300.77       301.11          0.34           0.11%                  [-0.6%, +0.5%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                                 401.01       396.55         -4.45          -1.11%                  [-2.7%, +0.3%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                              1508.42      1496.58        -11.84          -0.78%                  [-2.7%, +1.3%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                                   434.15       428.98         -5.17          -1.19%                  [-3.6%, +0.3%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                                3716.43      3670.06        -46.37          -1.25%                  [-2.3%, +1.0%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                                  377.45       377.25         -0.20          -0.05%                  [-1.6%, +1.1%]
std::vector<int>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                               1213.18      1235.80         22.62           1.86%                  [-0.6%, +3.0%]
std::vector<int>::insert(middle)_(cheap_elements)/32                                                                        5.89         5.10         -0.79         -13.35%        x         [-16.6%, -1.2%]
std::vector<int>::insert(middle)_(cheap_elements)/8192                                                                    146.54       143.13         -3.41          -2.33%                  [-4.6%, +1.8%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/32                                                                2.09         2.09         -0.00          -0.04%                  [-0.9%, +0.3%]
std::vector<int>::operator=(const_Self&)_(cheap_elements)/8192                                                            343.58       374.26         30.68           8.93%                  [-13.6%, +28.5%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/32                                                                24.83        24.56         -0.27          -1.08%                  [-3.1%, +1.3%]
std::vector<int>::push_back()_(growing)_(cheap_elements)/8192                                                             557.28       549.68         -7.60          -1.36%                  [-5.7%, +1.5%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/32                                                          14.06        13.99         -0.07          -0.50%                  [-1.5%, +0.6%]
std::vector<int>::push_back()_(many_elements)_(cheap_elements)/8192                                                         0.62         0.62         -0.00          -0.33%                  [-1.0%, +1.6%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/32                                                            0.53         0.53          0.00           0.01%                  [-0.7%, +0.7%]
std::vector<int>::push_back()_(with_reserve)_(cheap_elements)/8192                                                          0.53         0.53          0.00           0.82%                  [-0.5%, +1.3%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/32                                       380.89       381.83          0.94           0.25%                  [-1.0%, +1.5%]
std::vector<std::string>::append_range()_(into_empty_container)_(cheap_elements)/8192                                    4508.73      4494.94        -13.79          -0.31%                  [-1.5%, +1.0%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/32                                   799.96       798.29         -1.66          -0.21%                  [-1.8%, +2.5%]
std::vector<std::string>::append_range()_(into_empty_container)_(expensive_elements)/8192                              101579.74    101351.63       -228.11          -0.22%                  [-4.1%, +2.0%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/32                              20.66        20.62         -0.04          -0.20%                  [-0.7%, +0.6%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(cheap_elements)/8192                          5087.97      5098.66         10.69           0.21%                  [-0.4%, +0.8%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/32                         144.24       146.18          1.94           1.35%        x         [+1.1%, +1.6%]
std::vector<std::string>::assign(input-iter,_input-iter)_(full_container)_(expensive_elements)/8192                     53997.25     54727.93        730.69           1.35%                  [-0.4%, +2.0%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/32                                                     37.89        37.89         -0.01          -0.02%                  [-2.3%, +2.6%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(cheap_elements)/8192                                                 6968.40      6971.59          3.20           0.05%                  [-1.7%, +1.1%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/32                                                697.42       697.17         -0.25          -0.04%                  [-1.3%, +1.1%]
std::vector<std::string>::ctor(Iterator,_Iterator)_(expensive_elements)/8192                                           171405.95    170655.65       -750.30          -0.44%                  [-2.7%, +4.1%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/32                                                                  37.68        37.61         -0.07          -0.19%                  [-2.0%, +1.6%]
std::vector<std::string>::ctor(Range)_(cheap_elements)/8192                                                              6904.65      6925.63         20.98           0.30%                  [-0.5%, +1.2%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/32                                                             701.76       708.47          6.71           0.96%                  [-3.6%, +7.3%]
std::vector<std::string>::ctor(Range)_(expensive_elements)/8192                                                        170235.06    169634.86       -600.20          -0.35%                  [-1.4%, +0.5%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/32                                                            37.89        37.77         -0.12          -0.33%                  [-2.6%, +1.6%]
std::vector<std::string>::ctor(const_Self&)_(cheap_elements)/8192                                                        6920.98      6914.35         -6.62          -0.10%                  [-1.7%, +1.8%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/32                                                       694.00       697.49          3.49           0.50%                  [-10.0%, +5.0%]
std::vector<std::string>::ctor(const_Self&)_(expensive_elements)/8192                                                  173622.17    170821.01      -2801.16          -1.61%                  [-4.5%, +0.9%]
std::vector<std::string>::ctor(size_type)/32                                                                               31.91        39.37          7.46          23.37%        x         [+19.1%, +24.3%]
std::vector<std::string>::ctor(size_type)/8192                                                                           3843.10      5436.71       1593.61          41.47%        x         [+36.7%, +43.9%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/32                                           36.52        36.68          0.15           0.41%                  [-1.7%, +2.7%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(cheap_elements)/8192                                       5708.15      5683.03        -25.13          -0.44%                  [-1.9%, +2.7%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/32                                      659.49       655.53         -3.97          -0.60%                  [-2.4%, +1.5%]
std::vector<std::string>::ctor(size_type,_const_value_type&)_(expensive_elements)/8192                                 168804.19    168901.27         97.07           0.06%                  [-0.9%, +1.4%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/32                                                               21.01        20.97         -0.05          -0.22%                  [-0.8%, +0.5%]
std::vector<std::string>::emplace(begin)_(cheap_elements)/8192                                                           4933.96      4940.20          6.24           0.13%                  [-0.7%, +1.7%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/32                                                           41.44        42.23          0.79           1.91%                  [-0.7%, +3.9%]
std::vector<std::string>::emplace(begin)_(expensive_elements)/8192                                                       4973.50      4982.43          8.93           0.18%                  [-1.7%, +5.6%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/32                                                              11.34        11.35          0.01           0.10%                  [-0.3%, +0.6%]
std::vector<std::string>::emplace(middle)_(cheap_elements)/8192                                                          2400.91      2403.35          2.45           0.10%                  [-0.4%, +0.4%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/32                                                          29.87        30.14          0.27           0.91%        x         [+0.0%, +2.5%]
std::vector<std::string>::emplace(middle)_(expensive_elements)/8192                                                      2430.77      2435.80          5.03           0.21%                  [-0.4%, +0.4%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/32                                                     47.24        44.99         -2.24          -4.75%        x         [-5.4%, -3.1%]
std::vector<std::string>::emplace_back()_(growing)_(cheap_elements)/8192                                                 2357.34      2342.97        -14.37          -0.61%                  [-1.9%, +0.3%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/32                                                 64.64        64.80          0.16           0.25%                  [-1.3%, +0.9%]
std::vector<std::string>::emplace_back()_(growing)_(expensive_elements)/8192                                             5140.48      5100.78        -39.71          -0.77%                  [-10.5%, +5.9%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/32                                               16.46        16.23         -0.23          -1.38%                  [-2.7%, +1.5%]
std::vector<std::string>::emplace_back()_(many_elements)_(cheap_elements)/8192                                              2.11         2.15          0.04           2.01%        x         [+0.2%, +3.9%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/32                                           28.50        28.23         -0.27          -0.93%                  [-2.8%, +1.5%]
std::vector<std::string>::emplace_back()_(many_elements)_(expensive_elements)/8192                                         13.19        13.16         -0.03          -0.25%                  [-2.3%, +1.4%]
std::vector<std::string>::emplace_back()_(with_reserve)_(cheap_elements)                                                    0.05         0.05          0.00           0.03%                  [-0.4%, +1.3%]
std::vector<std::string>::emplace_back()_(with_reserve)_(expensive_elements)                                                0.10         0.10          0.00           1.22%                  [-1.7%, +2.6%]
std::vector<std::string>::erase(begin)_(cheap_elements)/32                                                                 11.91        11.84         -0.07          -0.63%                  [-1.5%, +0.4%]
std::vector<std::string>::erase(begin)_(cheap_elements)/8192                                                             2831.21      2860.28         29.07           1.03%                  [-0.9%, +7.3%]
std::vector<std::string>::erase(begin)_(expensive_elements)/32                                                             27.73        27.86          0.12           0.45%                  [-0.4%, +2.6%]
std::vector<std::string>::erase(begin)_(expensive_elements)/8192                                                         2881.50      2857.78        -23.72          -0.82%                  [-1.5%, +0.2%]
std::vector<std::string>::erase(middle)_(cheap_elements)/32                                                                 7.44         7.42         -0.03          -0.34%                  [-1.5%, +0.4%]
std::vector<std::string>::erase(middle)_(cheap_elements)/8192                                                             910.57       911.78          1.21           0.13%                  [-1.3%, +1.6%]
std::vector<std::string>::erase(middle)_(expensive_elements)/32                                                            25.09        24.74         -0.35          -1.41%                  [-3.9%, +4.4%]
std::vector<std::string>::erase(middle)_(expensive_elements)/8192                                                         902.97       906.81          3.84           0.42%                  [-0.1%, +1.1%]
std::vector<std::string>::insert(begin)_(cheap_elements)/32                                                                21.03        20.97         -0.05          -0.26%                  [-0.7%, +0.4%]
std::vector<std::string>::insert(begin)_(cheap_elements)/8192                                                            4957.25      4955.94         -1.31          -0.03%                  [-1.0%, +1.9%]
std::vector<std::string>::insert(begin)_(expensive_elements)/32                                                            42.01        41.87         -0.14          -0.34%                  [-1.1%, +1.2%]
std::vector<std::string>::insert(begin)_(expensive_elements)/8192                                                        4962.08      4959.20         -2.88          -0.06%                  [-0.7%, +0.3%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/32                         433.92       436.19          2.27           0.52%                  [-0.1%, +1.7%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(cheap_elements)/8192                     10053.70     10167.69        113.98           1.13%        x         [+0.6%, +2.0%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/32                     827.79       832.16          4.38           0.53%                  [-1.7%, +2.6%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(half_filled)_(expensive_elements)/8192                104737.98    104459.51       -278.47          -0.27%                  [-6.2%, +2.9%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/32                           501.60       505.44          3.83           0.76%                  [-0.1%, +2.8%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(cheap_elements)/8192                       20727.16     22502.68       1775.52           8.57%        x         [+6.8%, +9.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/32                       912.73       905.25         -7.48          -0.82%                  [-3.7%, +2.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(near_full)_(expensive_elements)/8192                  121171.23    123009.57       1838.35           1.52%                  [-2.0%, +5.5%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/32                          527.96       526.49         -1.47          -0.28%                  [-1.0%, +0.9%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(cheap_elements)/8192                      11522.06     11423.73        -98.33          -0.85%                  [-1.6%, +0.4%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/32                      888.69       898.68          9.99           1.12%                  [-0.8%, +2.3%]
std::vector<std::string>::insert(begin,_input-iter,_input-iter)_(no_realloc)_(expensive_elements)/8192                 107691.05    107382.88       -308.17          -0.29%                  [-8.0%, +3.0%]
std::vector<std::string>::insert(middle)_(cheap_elements)/32                                                               11.41        11.37         -0.05          -0.43%                  [-0.9%, +0.3%]
std::vector<std::string>::insert(middle)_(cheap_elements)/8192                                                           2406.26      2403.83         -2.42          -0.10%                  [-0.4%, +0.3%]
std::vector<std::string>::insert(middle)_(expensive_elements)/32                                                           29.98        29.90         -0.08          -0.25%                  [-3.9%, +2.1%]
std::vector<std::string>::insert(middle)_(expensive_elements)/8192                                                       2429.61      2429.47         -0.14          -0.01%                  [-0.6%, +0.6%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/32                                                       16.63        16.63         -0.00          -0.01%                  [-0.6%, +0.6%]
std::vector<std::string>::operator=(const_Self&)_(cheap_elements)/8192                                                   4664.62      4650.93        -13.68          -0.29%                  [-0.8%, +0.9%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/32                                                  144.00       144.14          0.15           0.10%                  [-1.0%, +0.8%]
std::vector<std::string>::operator=(const_Self&)_(expensive_elements)/8192                                              54115.14     53747.45       -367.68          -0.68%                  [-1.2%, +0.8%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/32                                                        46.63        45.69         -0.94          -2.01%        x         [-3.6%, -1.5%]
std::vector<std::string>::push_back()_(growing)_(cheap_elements)/8192                                                    2357.06      2339.52        -17.54          -0.74%                  [-1.7%, +0.5%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/32                                                    64.88        63.99         -0.89          -1.37%                  [-2.2%, +0.9%]
std::vector<std::string>::push_back()_(growing)_(expensive_elements)/8192                                                5125.95      5093.70        -32.25          -0.63%                  [-11.6%, +6.0%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/32                                                  16.35        16.30         -0.05          -0.33%                  [-3.2%, +1.4%]
std::vector<std::string>::push_back()_(many_elements)_(cheap_elements)/8192                                                 2.15         2.18          0.03           1.59%        x         [+0.6%, +3.8%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/32                                              28.54        28.64          0.10           0.34%                  [-0.9%, +2.9%]
std::vector<std::string>::push_back()_(many_elements)_(expensive_elements)/8192                                            13.27        13.26         -0.01          -0.08%                  [-8.3%, +3.8%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/32                                                    1.72         1.74          0.01           0.84%        x         [+0.0%, +2.6%]
std::vector<std::string>::push_back()_(with_reserve)_(cheap_elements)/8192                                                  1.71         1.75          0.03           2.03%        x         [+0.9%, +3.0%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/32                                               19.67        19.54         -0.13          -0.67%                  [-4.4%, +2.0%]
std::vector<std::string>::push_back()_(with_reserve)_(expensive_elements)/8192                                             19.66        19.48         -0.17          -0.89%                  [-3.0%, +0.2%]
Geomean                                                                                                                   267.39       267.57          0.18           0.07%

@philnik777
philnik777 marked this pull request as ready for review August 26, 2026 13:18
@philnik777
philnik777 requested a review from a team as a code owner August 26, 2026 13:18
@philnik777 philnik777 self-assigned this Aug 26, 2026
@philnik777 philnik777 added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance labels Aug 26, 2026
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

This avoids using a lot of stack memory for emplace_back by making the outlined lambda static. This also reduces the number of instructions to execute a simple emplace_back.


Full diff: https://github.com/llvm/llvm-project/pull/218658.diff

1 Files Affected:

  • (modified) libcxx/include/__vector/vector.h (+23-28)
diff --git a/libcxx/include/__vector/vector.h b/libcxx/include/__vector/vector.h
index ebcfcc17d4b6d..dad2f5f48596a 100644
--- a/libcxx/include/__vector/vector.h
+++ b/libcxx/include/__vector/vector.h
@@ -754,9 +754,6 @@ class _LIBCPP_WARN_UNUSED vector {
     __annotate_shrink(__old_size);
   }
 
-  template <class... _Args>
-  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI inline pointer __emplace_back_slow_path(_Args&&... __args);
-
   // The following functions are no-ops outside of AddressSanitizer mode.
   // We call annotations for every allocator, unless explicitly disabled.
   //
@@ -1071,34 +1068,25 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<_Tp, _Allocator>::shrink_to_fit() _NOE
   }
 }
 
-template <class _Tp, class _Allocator>
-template <class... _Args>
-_LIBCPP_CONSTEXPR_SINCE_CXX20 typename vector<_Tp, _Allocator>::pointer
-vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args) {
-  _SplitBuffer __v(__recommend(size() + 1), size(), this->__layout_.__alloc());
-  //    __v.emplace_back(std::forward<_Args>(__args)...);
-  pointer __end = __v.end();
-  __alloc_traits::construct(this->__layout_.__alloc(), std::__to_address(__end), std::forward<_Args>(__args)...);
-  __v.__set_sentinel(++__end);
-  __layout_.__relocate(__v);
-  return __end;
-}
-
 // This makes the compiler inline `__else()` if `__cond` is known to be false. Currently LLVM doesn't do that without
 // the `__builtin_constant_p`, since it considers `__else` unlikely even through it's known to be run.
 // See https://llvm.org/PR154292
-template <class _If, class _Else>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __if_likely_else(bool __cond, _If __if, _Else __else) {
+template <class _If, class _Else, class... _Args>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 decltype(std::declval<_If>()(std::declval<_Args&&>()...))
+__if_likely_else(bool __cond, _If __if, _Else __else, _Args&&... __args) {
+  static_assert(
+      is_same<decltype(__if(std::forward<_Args>(__args)...)), decltype(__else(std::forward<_Args>(__args)...))>::value,
+      "Return type of if and else branch have to be the same type");
   if (__builtin_constant_p(__cond)) {
     if (__cond)
-      __if();
+      return __if(std::forward<_Args>(__args)...);
     else
-      __else();
+      return __else(std::forward<_Args>(__args)...);
   } else {
     if (__cond) [[__likely__]]
-      __if();
+      return __if(std::forward<_Args>(__args)...);
     else
-      __else();
+      return __else(std::forward<_Args>(__args)...);
   }
 }
 
@@ -1106,16 +1094,23 @@ template <class _Tp, class _Alloc>
 template <class... _Args>
 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Alloc>::__emplace_back_result_t
 vector<_Tp, _Alloc>::emplace_back(_Args&&... __args) {
-  pointer __end = __layout_.__end_ptr();
   std::__if_likely_else(
       size() != capacity(),
-      [&] {
-        __emplace_back_assume_capacity(std::forward<_Args>(__args)...);
-        ++__end;
+      [](vector& __self, _Args&&... __largs) static {
+        __self.__emplace_back_assume_capacity(std::forward<_Args>(__largs)...);
+      },
+      [](vector& __self, _Args&&... __largs) static {
+        _SplitBuffer __v(__self.__recommend(__self.size() + 1), __self.size(), __self.__layout_.__alloc());
+        //    __v.emplace_back(std::forward<_Args>(__args)...);
+        pointer __end = __v.end();
+        __alloc_traits::construct(
+            __self.__layout_.__alloc(), std::__to_address(__end), std::forward<_Args>(__largs)...);
+        __v.__set_sentinel(++__end);
+        __self.__layout_.__relocate(__v);
       },
-      [&] { __end = __emplace_back_slow_path(std::forward<_Args>(__args)...); });
+      *this,
+      std::forward<_Args>(__args)...);
 
-  __layout_.__set_bound_using_pointer(__end);
 #if _LIBCPP_STD_VER >= 17
   return back();
 #endif

@philnik777

Copy link
Copy Markdown
Contributor Author

@liza371 This might also fix your issue with emplace_back.

@liza371

liza371 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@liza371 This might also fix your issue with emplace_back.

Oh wow this does help a lot this is awesome. Just for reference here's the binary size diff with this specific optimization: https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2Fb16984ce99c702355a5b2b4c52574e82cec41fb9_4b112225b8291de813e1d486a4265bea054f4115.sizediff&group_by=template

You also rightly pointed out I didn't include an analysis with the ABI turned off. Here's an analysis with the sized based vector ABI turned off for reference

https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2Fb16984ce99c702355a5b2b4c52574e82cec41fb9_9f0668506b95d84647600cd74b220f49e0c399a8.sizediff&group_by=template

I haven't run this analysis with the unstable ABI fully turned off as chromium depends on other features pretty heavily so it would be non-trivial to do so.

@ldionne

ldionne commented Sep 1, 2026

Copy link
Copy Markdown
Member

@liza371 That tool looks amazing. I'm trying to understand the output though: does it mean that applying this patch increases the overall size of Chromium by 140.35 KiB (for unstable ABI) and 62.68 KiB (for stable ABI) no matter what? Isn't that a net regression? I think this is just how I'm reading the tool's output.

@ldionne ldionne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the code changes, but the benchmarks are not very conclusive. Do we think this is simply because our benchmarks are not sensitive enough to capture this improvement?

@liza371

liza371 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@ldionne not quite, I should have linked my other PR sorry about that. I opened #216822 to address the binary size bloat we were seeing in Chromium, and I have links there to show the initial bloat. Applying this patch still leads to an increase in Chromium's binary size, but it's a much smaller increase than we saw when we pulled in size-based vector.

I initially was also trying to land some changes to emplace_back that @cjdb wrote but @philnik777 noted that they would remove a lot of other performance optimizations, so I shelved that. #216822 still has some small patches, but I got sidetracked and now I'm admittedly still not entirely sure why the inlining does help with the bloat, so I wanted to do some more investigating to get a more definitive answer than "idk the tool says so" before coming back to that PR.

@philnik777

Copy link
Copy Markdown
Contributor Author

I like the code changes, but the benchmarks are not very conclusive. Do we think this is simply because our benchmarks are not sensitive enough to capture this improvement?

Yes, I think so. emplace_back is rather fast if you don't grow, and having a tight loop will cause the improvements to not really show up. What we're really doing here is providing more resources to the code around the emplace_back by reducing the amount of stack memory and registers required. This is obviously not captured here, since there is nothing around to make use of these resources.

@ldionne ldionne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liza371 Just to clarify, even if we land this patch, you're still blocked from rolling libc++ because of the size increase, it's just not as bad, right? In other words, it seems that we still need to figure out what made __relocate (from this) go larger, no matter what.

@liza371 What optimization level does Chrome build with?

Either way, I think this change is a net positive so let's go with it, but let's figure out what went wrong with __relocate as well.

@philnik777
philnik777 merged commit aafc318 into llvm:main Sep 3, 2026
87 checks passed
@philnik777
philnik777 deleted the optimize_vector_emplace_back branch September 3, 2026 15:18
@liza371

liza371 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@ldionne yes that's correct. We're building with -O2 on most releases, and one some small android releases we build with -Os and we also see a regression there.

I did just attempt a build with -O1 and actually see roughly the same size increase.

Size diff w/ -O1: https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2Fb16984ce99c702355a5b2b4c52574e82cec41fb9_ec81d14a14d102f226169100abb31fffd83ca985.sizediff&group_by=template

Size diff w/ -O2: https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2Fb16984ce99c702355a5b2b4c52574e82cec41fb9_704a5fc995977400ff5b7760f5f27e64e6db6a25.sizediff&group_by=template

These are both without the emplace_back patch that just merged.

Iasonaskrpr pushed a commit to Iasonaskrpr/llvm-project that referenced this pull request Sep 4, 2026
This avoids using a lot of stack memory for `emplace_back` by making the
outlined lambda `static`. This also reduces the number of instructions
to execute a simple `emplace_back`.
addmisol pushed a commit to addmisol/llvm-project2 that referenced this pull request Sep 6, 2026
This avoids using a lot of stack memory for `emplace_back` by making the
outlined lambda `static`. This also reduces the number of instructions
to execute a simple `emplace_back`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants