-
Notifications
You must be signed in to change notification settings - Fork 184
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
move to wasmer 3.1.1 #3367
move to wasmer 3.1.1 #3367
Conversation
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
|
||
const WASM_BYTES: &[u8] = include_bytes!("../list_to_ucptrie.wasm"); | ||
|
||
lazy_static! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: If you are not using lazy_static any more, please remove it from cargo.toml
let mut store = Store::default(); | ||
let module = Module::new(&store, WASM_BYTES).expect("valid WASM"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: it seems like a regression that we need to parse the bytes to a module every time. Before we did it in the lazy_static, such that the first call was slow but every subsequent call was fast. It appears that Wasmer 3 requires the store to be mutable. I wonder why? It seems like we should still be able to create a Module just once and then an Instance for each call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually does the store need to be the same for the Module and the Instance? Otherwise why would the API allow you to pass different arguments to both instead of just borrowing the store from the Module!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples in https://github.com/wasmerio/wasmer/blob/v3.2.1/examples/hello_world.rs#L46-L71 also do the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but those hello world examples don't need to re-use the module. We should be able to parse the module once and not be required to re-parse it on every function call, just as we were able to do in Wasmer 2.0.
CC @syrusakbary for potential advice on updating from wasmer 2 to wasmer 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
Some benches on Mac x86
This PR
HEAD @ 2f5c923
|
Make sure the bench is writing multiple keys that all use the WASM module. My thesis is that there's a perf regression when the module is being reused. |
Well there's a perf regressions even for a single key... |
Discussion: we want to update to wasmer 3, but there shouldn't be a performance hit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
The latest versions are now:
Perhaps the performance has been improved? |
#3241
cargo audit
still complains about mach