Commit 5d00076
committed
Clarify and improve
`INLINE_CAPACITY` has two different uses:
- It dictates the inline capacity of `EdgesVec::edges`, which is a
`SmallVec`.
- It dictates when `TaskDeps` switches from a linear scan lookup to a
hashset lookup to determine if an edge has been seen before.
These two uses are in the same part of the code, but they're
fundamentally separate and don't need to use the same constant.
This commit separates the two uses, and adds some helpful comments,
making the code clearer. It also changes the value used for the
linear/hashset threshold from 8 to 16, which gives slightly better perf.EdgesVec::INLINE_CAPACITY use.1 parent 43e813c commit 5d00076
2 files changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
| |||
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | | - | |
496 | | - | |
497 | | - | |
| 497 | + | |
| 498 | + | |
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| |||
1304 | 1305 | | |
1305 | 1306 | | |
1306 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
1307 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1308 | 1316 | | |
| 1317 | + | |
1309 | 1318 | | |
1310 | 1319 | | |
1311 | 1320 | | |
1312 | 1321 | | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
1313 | 1325 | | |
1314 | 1326 | | |
1315 | 1327 | | |
| |||
0 commit comments