You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RemoveUnusedModuleElements: Scan indirect calls once up front [NFC] (#8116)
Before, for each call_indirect signature (type+table) we scanned the elems to
find the callable functions. We used caching here, so it seemed fairly fast.
Measuring on a large Dart testcase, however, just scanning the elems
multiple times (once per type) is a lot of overhead. This avoids that by
scanning elems up front and filling in a data structure with all the info for
fast querying later.
Note the real overhead is not the table scanning, but all the HeapType::isSubType
calls. If we could make those fast it would be good, but this PR avoids the
issue in this pass at least.
This PR may be slower if no indirect calls exist (in that case we'd never
scan the table), but I see no memory overhead and it makes this Dart
testcase 2.8x faster on this pass, which runs more than once,
making the total -O3 noticeably faster, 15%.
0 commit comments