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

Handle host functions in the instruction executor #1041

Merged
merged 22 commits into from
May 22, 2024
Merged

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented May 22, 2024

Closes #970

This makes use of the non-generic StoreInner where possible and only uses the generic Store<T> where needed.

  • Locally I see performance improvements for host function calls of ~30%.
  • Also due to the inlining adjustments I also saw performance improvements across the boards for compute intense workloads such as count_until of up to 30% but on average by 4-5%.

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 71.00917% with 158 lines in your changes are missing coverage. Please review.

Project coverage is 80.70%. Comparing base (fe51c1b) to head (e5395ee).
Report is 1 commits behind head on master.

Files Patch % Lines
crates/wasmi/src/engine/executor/instrs.rs 77.57% 50 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/call.rs 68.33% 38 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/table.rs 63.79% 21 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/memory.rs 65.95% 16 Missing ⚠️
crates/wasmi/src/engine/executor/mod.rs 81.63% 9 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/global.rs 20.00% 8 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/store.rs 46.66% 8 Missing ⚠️
crates/wasmi/src/engine/executor/instrs/load.rs 72.72% 3 Missing ⚠️
crates/wasmi/src/error.rs 66.66% 3 Missing ⚠️
crates/wasmi/src/engine/code_map.rs 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1041      +/-   ##
==========================================
- Coverage   80.86%   80.70%   -0.17%     
==========================================
  Files         271      268       -3     
  Lines       24896    24964      +68     
==========================================
+ Hits        20132    20146      +14     
- Misses       4764     4818      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Robbepop Robbepop merged commit 96aa797 into master May 22, 2024
16 of 18 checks passed
@Robbepop Robbepop deleted the rf-refactor-executor branch May 22, 2024 11:42
Robbepop added a commit that referenced this pull request May 23, 2024
Robbepop added a commit that referenced this pull request May 23, 2024
* unpack ResumableHostError for non-resumeble calls

This was an oversight in #1041.

* add doc note

* add docs to ResumableHostError fields

* apply rustfmt

* fix clippy warnings

* fix clippy issues in tests
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.

Handle host function calls the same as other instructions in the Wasmi executor
1 participant