Skip to content

perf: cache repeated tree walks to avoid O(N^2) in optimizeTerminatingTails in CodeFolding#8602

Draft
Changqing-JING wants to merge 2 commits intoWebAssembly:mainfrom
Changqing-JING:opt/compile-speed3
Draft

perf: cache repeated tree walks to avoid O(N^2) in optimizeTerminatingTails in CodeFolding#8602
Changqing-JING wants to merge 2 commits intoWebAssembly:mainfrom
Changqing-JING:opt/compile-speed3

Conversation

@Changqing-JING
Copy link
Copy Markdown
Contributor

@Changqing-JING Changqing-JING commented Apr 14, 2026

Can reduce the time cost of CodeFolding futher

Benmark data

For the test case in #7319 (comment)
This PR:

time ./build/bin/wasm-opt -Oz --enable-bulk-memory --enable-multivalue --enable-reference-types --enable-gc --enable-tail-call --enable-exception-handling  -o /dev/null ./test3.wasm

real    1m46.297s
user    25m1.458s
sys     1m11.452s

@Changqing-JING Changqing-JING requested a review from a team as a code owner April 14, 2026 09:16
@Changqing-JING Changqing-JING requested review from tlively and removed request for a team April 14, 2026 09:16
@Changqing-JING Changqing-JING marked this pull request as draft April 14, 2026 09:16
@Changqing-JING Changqing-JING marked this pull request as ready for review April 15, 2026 14:02
@Changqing-JING Changqing-JING marked this pull request as draft April 15, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant