Skip to content

Wasm: Store the contents of constant primitive arrays in data segments. #5219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2025

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Aug 9, 2025

Paradoxically, this makes the produced .wasm a bit larger. That is because the elements are never LEB-encoded.

However, it should speed up decoding, compiling and executing the Wasm module.

@sjrd sjrd requested a review from gzm0 August 9, 2025 15:35
Copy link
Contributor

@gzm0 gzm0 left a comment

Choose a reason for hiding this comment

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

LGTM modulo comments.

…nts.

Paradoxically, this makes the produced .wasm a bit larger. That is
because the elements are never LEB-encoded.

However, it should speed up decoding, compiling and executing the
Wasm module.
@sjrd sjrd force-pushed the wasm-constant-arrays-in-data-segments branch from 8c1404b to 68c765f Compare August 17, 2025 16:11
@sjrd sjrd enabled auto-merge August 17, 2025 17:10
@sjrd sjrd merged commit 1b0e7a6 into scala-js:main Aug 17, 2025
3 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