Skip to content

perf: optimize OperatorsReader::skip_const_expr - #2653

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
dishmaker:dishmaker/perf_wasmparser_skip_const_expr
Sep 11, 2026
Merged

perf: optimize OperatorsReader::skip_const_expr#2653
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
dishmaker:dishmaker/perf_wasmparser_skip_const_expr

Conversation

@dishmaker

@dishmaker dishmaker commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This optimizes just OperatorsReader::skip_const_expr from:

bench parse/tests change: -2%

[Spoiler] cargo bench

ran 4 times (main and my branch)

parse/tests             time:   [7.5023 ms 7.5062 ms 7.5105 ms]
                        change: [−2.2118% −2.0553% −1.9033%] (p = 0.00 < 0.05)
                        Performance has improved.
parse/tests             time:   [7.4871 ms 7.4903 ms 7.4937 ms]
                        change: [−2.5212% −2.4240% −2.3359%] (p = 0.00 < 0.05)
                        Performance has improved.
parse/tests             time:   [7.4769 ms 7.4807 ms 7.4849 ms]
                        change: [−2.4526% −2.3487% −2.2449%] (p = 0.00 < 0.05)
                        Performance has improved.                
parse/tests             time:   [7.4658 ms 7.4712 ms 7.4768 ms]
                        change: [−2.0683% −1.9672% −1.8664%] (p = 0.00 < 0.05)
                        Performance has improved.


                        
validate/tests          time:   [43.889 ms 43.930 ms 43.977 ms]
                        change: [+0.9219% +1.0458% +1.1819%] (p = 0.00 < 0.05)
                        Change within noise threshold.
validate/tests          time:   [43.413 ms 43.440 ms 43.467 ms]
                        change: [−0.5937% −0.4812% −0.3684%] (p = 0.00 < 0.05)
                        Change within noise threshold.
validate/tests          time:   [43.516 ms 43.570 ms 43.634 ms]
                        change: [−0.0868% +0.0767% +0.2552%] (p = 0.36 > 0.05)
                        No change in performance detected.
validate/tests          time:   [43.715 ms 43.747 ms 43.782 ms]
                        change: [−0.0765% +0.0745% +0.2170%] (p = 0.32 > 0.05)
                        No change in performance detected.

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dishmaker
dishmaker marked this pull request as ready for review September 11, 2026 17:16
@dishmaker
dishmaker requested a review from a team as a code owner September 11, 2026 17:16
@dishmaker
dishmaker requested review from fitzgen and removed request for a team September 11, 2026 17:16
@alexcrichton
alexcrichton added this pull request to the merge queue Sep 11, 2026
Merged via the queue into bytecodealliance:main with commit d2e8a66 Sep 11, 2026
37 checks passed
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.

2 participants