Commit 6dd2cad
[libc++] Fold __search_substring into _Traits::find in case the second string has length 1 (llvm#160076)
Apple M4:
```
Benchmark Baseline Candidate Difference % Difference
----------------------------------------------------------- ---------- ----------- ------------ --------------
BM_string_literal/1024 16.99 16.79 -0.21 -1.21
BM_string_literal/128 3.44 3.34 -0.10 -2.88
BM_string_literal/16 1.80 1.69 -0.11 -5.93
BM_string_literal/2048 38.44 38.38 -0.07 -0.17
BM_string_literal/256 5.77 5.65 -0.12 -2.02
BM_string_literal/32 2.03 1.92 -0.11 -5.44
BM_string_literal/4096 73.92 73.74 -0.18 -0.25
BM_string_literal/512 9.49 9.41 -0.08 -0.84
BM_string_literal/64 2.59 2.45 -0.14 -5.38
BM_string_literal/8 1.79 1.69 -0.11 -5.90
BM_string_literal/8192 132.09 131.81 -0.28 -0.21
```1 parent 6dafe1e commit 6dd2cad
File tree
3 files changed
+63
-0
lines changed- libcxx
- include/__string
- test
- benchmarks/containers
- std/strings/basic.string/string.ops/string_find
3 files changed
+63
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
63 | 102 | | |
64 | 103 | | |
65 | 104 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
| 95 | + | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| 100 | + | |
90 | 101 | | |
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
| 110 | + | |
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
101 | 114 | | |
| 115 | + | |
102 | 116 | | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| 120 | + | |
106 | 121 | | |
107 | 122 | | |
108 | 123 | | |
109 | 124 | | |
| 125 | + | |
110 | 126 | | |
111 | 127 | | |
112 | 128 | | |
113 | 129 | | |
| 130 | + | |
114 | 131 | | |
115 | 132 | | |
116 | 133 | | |
| |||
0 commit comments