Commit 8150fb0
committed
[InterfaceFile] Improve flag extraction from interface file
Improve the version/flags extract from interface file by moving away
from using Regex and limiting the search to the beginning of the file.
Switch away from Regex will give 5-10% improvement in time and
instruction counts, and limiting the search lines can save a lot of time
if the swiftinterface is large. For example, the extract time for Swift
stdlib is 10x faster after the patch.
Current strategey for limiting the line to search is by only parsing the
first comment block.1 parent 56ec625 commit 8150fb0
File tree
5 files changed
+34
-24
lines changed- include/swift/Frontend
- lib/Serialization
- test
- ModuleInterface
- SPI
5 files changed
+34
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
1389 | 1390 | | |
1390 | 1391 | | |
1391 | 1392 | | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1392 | 1411 | | |
1393 | 1412 | | |
1394 | 1413 | | |
1395 | 1414 | | |
1396 | 1415 | | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
| 1416 | + | |
| 1417 | + | |
1400 | 1418 | | |
1401 | | - | |
1402 | | - | |
| 1419 | + | |
1403 | 1420 | | |
1404 | 1421 | | |
1405 | 1422 | | |
| |||
1421 | 1438 | | |
1422 | 1439 | | |
1423 | 1440 | | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1435 | 1445 | | |
1436 | 1446 | | |
1437 | 1447 | | |
1438 | | - | |
| 1448 | + | |
1439 | 1449 | | |
1440 | 1450 | | |
1441 | 1451 | | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1446 | 1457 | | |
1447 | 1458 | | |
1448 | 1459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
0 commit comments