Commit cfa8abd
authored
[NFC] Optimize ModuleUtils type-scanning code (#8572)
Before, we always did a loop on `type.getHeapTypeChildren()` which
means setting up a scanner object and going through a generic
path. Instead, handle the common cases directly. This avoids any
generic path in the common case.
This makes us 1% faster on `-O3`, as measured by instruction
count, number of branches, and walltime. The noise in the first
two is incredibly small, so this looks reliably faster.1 parent b09fad0 commit cfa8abd
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
367 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
| |||
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
377 | | - | |
378 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
379 | 392 | | |
380 | 393 | | |
381 | 394 | | |
| |||
0 commit comments