Skip to content

Conversation

@CPunisher
Copy link
Member

Description:

I think it's worth to inline skip_space after #11225, which made skip_space simple and short.

Copilot AI review requested due to automatic review settings November 10, 2025 03:58
@CPunisher CPunisher requested a review from a team as a code owner November 10, 2025 03:58
@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: c841f00

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the inlining hint for the skip_space method from #[inline(never)] to #[inline], allowing the compiler to inline this frequently-called method for better performance.

  • Performance optimization by enabling inlining of the skip_space method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Binary Sizes

File Size
swc.linux-x64-gnu.node 31M (31911176 bytes)

Commit: e353c0a

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 10, 2025

CodSpeed Performance Report

Merging #11252 will improve performances by 5.13%

Comparing CPunisher:11-30-perf/inline-skip-space (c841f00) with main (d66dab5)1

Summary

⚡ 7 improvements
✅ 131 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
es/lexer/angular 6.9 ms 6.7 ms +3.22%
es/lexer/backbone 916.3 µs 875.3 µs +4.69%
es/lexer/jquery 4.9 ms 4.6 ms +4.7%
es/lexer/jquery mobile 7.5 ms 7.2 ms +4.54%
es/lexer/mootools 3.7 ms 3.6 ms +5.13%
es/lexer/underscore 772.6 µs 737.6 µs +4.74%
es/lexer/yui 4.2 ms 4 ms +3.91%

Footnotes

  1. No successful run was found on main (527c391) during the generation of this report, so d66dab5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@kdy1 kdy1 added this to the Planned milestone Nov 10, 2025
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Nice!

@kdy1 kdy1 changed the title perf(es/parser): inline skip_space perf(es/parser): Inline skip_space Nov 10, 2025
@kdy1 kdy1 requested a review from a team as a code owner November 10, 2025 06:00
@kdy1 kdy1 merged commit afb824a into swc-project:main Nov 10, 2025
35 checks passed
@kdy1 kdy1 modified the milestones: Planned, 1.15.0 Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants