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

Use CachedMemory in bulk-ops executors #1075

Merged
merged 7 commits into from
Jun 17, 2024
Merged

Use CachedMemory in bulk-ops executors #1075

merged 7 commits into from
Jun 17, 2024

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Jun 17, 2024

Locally this yielded a performance improvement for our bulk-ops benchmark test case by roughly 3.5%.
The local test uses memory.copy and memory.fill with 5000 bytes per operation.
Note that performance wins for bulk-ops with smaller lengths are going to be way more significant.

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.47%. Comparing base (c3dc480) to head (cbd684a).

Current head cbd684a differs from pull request most recent head afc3c5f

Please upload reports for the commit afc3c5f to get more accurate results.

Files Patch % Lines
crates/wasmi/src/engine/executor/instrs/memory.rs 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   80.47%   80.47%   -0.01%     
==========================================
  Files         269      269              
  Lines       24975    24974       -1     
==========================================
- Hits        20099    20097       -2     
- Misses       4876     4877       +1     

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

@Robbepop
Copy link
Member Author

Robbepop commented Jun 17, 2024

Unfortunately, despite the triviality of the changes introduced by this PR local benchmarks indicate extreme performance regressions of 10-20% across the board. Probably the Rust/LLVM optimization heuristics for optimizing the loop+match construct in the interpreter's hot path got confused by this ... again.

@Robbepop
Copy link
Member Author

afc3c5f helped to eliminate all locally observed performance regressions.

@Robbepop Robbepop merged commit 82d96f3 into master Jun 17, 2024
15 of 16 checks passed
@Robbepop Robbepop deleted the rf-opt-bulk-ops branch June 17, 2024 11:04
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.

None yet

1 participant