Skip to content
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

Refine read leb in wasm loader of fast interpreter #4017

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wenyongh
Copy link
Contributor

@wenyongh wenyongh commented Jan 10, 2025

For the wasm loader of fast interpreter, since the leb format has been checked
in the first time traversing, we can skip the check in the second time traversing.
This PR calls read_leb_quick instead of read_leb_xxx in the second time scan to
improve the loader's performance.

@wenyongh wenyongh changed the title [test] Refine read leb int wasm loader of fast interpreter Refine read leb int wasm loader of fast interpreter Jan 11, 2025
@wenyongh wenyongh changed the title Refine read leb int wasm loader of fast interpreter Refine read leb in wasm loader of fast interpreter Jan 11, 2025
Copy link
Collaborator

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

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

LGTM.

Just a thought – perhaps a leb-cache (mapping from leb values to constant values) would be more effective. It could be shared across different running modes.

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