Commit 4d6fd9c
authored
Rollup merge of rust-lang#57494 - dotdash:expand, r=nikomatsakis
Speed up item_bodies for large match statements involving regions
These changes don't change anything about the complexity of the algorithms, but use some easy shortcuts or modifications to cut down some overhead.
The first change, which incrementally removes the constraints from the set we're iterating over probably introduces some overhead for small to medium sized constraint sets, but it's not big enough for me to observe it in any project I tested against (not that many though).
Though most other crates probably won't improve much at all, because huge matches aren't that common, the changes seemed simple enough for me to make them.
Ref rust-lang#55528
cc unicode-rs/unicode-normalization#29
r? @nikomatsakis1 file changed
+23
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | | - | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
205 | | - | |
| 211 | + | |
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
| |||
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
271 | 284 | | |
272 | 285 | | |
273 | 286 | | |
| |||
710 | 723 | | |
711 | 724 | | |
712 | 725 | | |
713 | | - | |
| 726 | + | |
714 | 727 | | |
| 728 | + | |
715 | 729 | | |
716 | 730 | | |
717 | 731 | | |
718 | 732 | | |
719 | 733 | | |
720 | 734 | | |
721 | | - | |
722 | | - | |
| 735 | + | |
| 736 | + | |
723 | 737 | | |
724 | 738 | | |
725 | 739 | | |
726 | 740 | | |
727 | | - | |
| 741 | + | |
| 742 | + | |
728 | 743 | | |
729 | 744 | | |
730 | 745 | | |
| |||
0 commit comments