Commit c567e28
authored
[libc++] Optimize vector<bool>::reserve (#170137)
Apple M4:
```
Benchmark old new Difference % Difference
-------------------------------------------------------------------------- ------ ---------- ------------ --------------
vector<bool>(const_vector<bool>&) 12.73 12.87 0.14 1.07%
vector<bool>(size_type,_const_value_type&) 9.39 9.41 0.02 0.22%
vector<bool>(vector<bool>&&,_const_allocator_type&)_(different_allocators) 16.87 15.22 -1.65 -9.80%
vector<bool>(vector<bool>&&,_const_allocator_type&)_(equal_allocators) 2.68 2.73 0.05 1.90%
vector<bool>::reserve() 11.81 9.43 -2.38 -20.14%
Geomean 9.14 8.62 -0.53 -5.76%
```1 parent 8c21064 commit c567e28
File tree
3 files changed
+47
-4
lines changed- libcxx
- docs/ReleaseNotes
- include/__vector
- test/benchmarks/containers/sequence
3 files changed
+47
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
| 765 | + | |
765 | 766 | | |
766 | 767 | | |
767 | 768 | | |
| |||
856 | 857 | | |
857 | 858 | | |
858 | 859 | | |
859 | | - | |
| 860 | + | |
| 861 | + | |
860 | 862 | | |
861 | 863 | | |
862 | 864 | | |
| |||
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
22 | 53 | | |
23 | 54 | | |
24 | 55 | | |
25 | 56 | | |
26 | 57 | | |
27 | 58 | | |
28 | 59 | | |
29 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
30 | 70 | | |
31 | 71 | | |
0 commit comments