-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
wasi: use WasmMemoryObject handle for perf #43544
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
Conversation
|
Review requested:
|
0424be9 to
49c3b76
Compare
d7ead7a to
5a05d10
Compare
|
|
||
| Local<ArrayBuffer> ab = prop.As<ArrayBuffer>(); | ||
| std::shared_ptr<BackingStore> backing_store = ab->GetBackingStore(); | ||
| Local<WasmMemoryObject> memory = PersistentToLocal::Strong(this->memory_); |
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.
tiny and very ignorable style nit:
| Local<WasmMemoryObject> memory = PersistentToLocal::Strong(this->memory_); | |
| Local<WasmMemoryObject> memory = PersistentToLocal::Strong(memory_); |
More directly, why are we not going on step further and storing the std::shared_ptr<BackingStore> here? That should be even faster.
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 arraybuffer gets detached every time the wasm grows its memory. very annoying problem, maybe it will be fixed one day: https://github.com/tc39/proposal-resizablearraybuffer#sync-up-capability-with-webassembly-memorygrow
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
c440735 to
98a1262
Compare
PR-URL: #43544 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
98a1262 to
4778831
Compare
PR-URL: #43544 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #43544 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #43544 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #43544 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Store
WebAssembly.Memoryhandle as aWasmMemoryObject, which lets us directly grab theArrayBufferinstead of doing a property lookup in this hot path.