Skip to content

perf(es/fast-lexer): optimize SIMD vector initialization with initialing u8x16 once.#10183

Merged
kdy1 merged 2 commits intoswc-project:mainfrom
GiveMe-A-Name:perf/init-u8x16-once
Mar 12, 2025
Merged

perf(es/fast-lexer): optimize SIMD vector initialization with initialing u8x16 once.#10183
kdy1 merged 2 commits intoswc-project:mainfrom
GiveMe-A-Name:perf/init-u8x16-once

Conversation

@GiveMe-A-Name
Copy link
Copy Markdown
Collaborator

Description:

Improves performance and reduces repeated allocations by initialing u8x16 in global to ensure constants u8x16 initial once.

  • Simplifies SIMD vector creation using u8x16::new()
  • Maintains the previous performance optimizations for lexer vector handling

BREAKING CHANGE:

Related issue (if exists):

…ell`

Improves performance and reduces repeated allocations by using `once_cell::sync::Lazy` for pre-initializing SIMD vectors in the lexer. This change:

- Moves SIMD vector initialization to static `Lazy` variables
- Reduces runtime overhead of repeated vector creation
…ing `u8x16` in global.

Improves performance and reduces repeated allocations by initialing `u8x16` in global to ensure constants u8x16 initial once.

- Simplifies SIMD vector creation using `u8x16::new()`
- Maintains the previous performance optimizations for lexer vector handling
@GiveMe-A-Name GiveMe-A-Name requested a review from a team as a code owner March 12, 2025 06:13
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 12, 2025

⚠️ No Changeset found

Latest commit: 5f55ea2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@kdy1 kdy1 merged commit 435197c into swc-project:main Mar 12, 2025
@kdy1 kdy1 modified the milestones: Planned, v1.11.10 Mar 17, 2025
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants