wasi: use WasmMemoryObject handle for perf#43544
Merged
Conversation
Collaborator
|
Review requested:
|
0424be9 to
49c3b76
Compare
tniessen
approved these changes
Jun 23, 2022
cjihrig
approved these changes
Jun 23, 2022
d7ead7a to
5a05d10
Compare
addaleax
approved these changes
Jun 23, 2022
|
|
||
| Local<ArrayBuffer> ab = prop.As<ArrayBuffer>(); | ||
| std::shared_ptr<BackingStore> backing_store = ab->GetBackingStore(); | ||
| Local<WasmMemoryObject> memory = PersistentToLocal::Strong(this->memory_); |
Member
There was a problem hiding this comment.
tiny and very ignorable style nit:
Suggested change
| 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.
Member
Author
There was a problem hiding this comment.
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 was referenced Jun 24, 2022
This comment was marked as outdated.
This comment was marked as outdated.
c440735 to
98a1262
Compare
Collaborator
PR-URL: #43544 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
98a1262 to
4778831
Compare
devsnek
added a commit
that referenced
this pull request
Jun 25, 2022
PR-URL: #43544 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This was referenced Jun 26, 2022
23 tasks
targos
pushed a commit
that referenced
this pull request
Jul 12, 2022
PR-URL: #43544 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Jul 20, 2022
PR-URL: #43544 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
PR-URL: #43544 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Store
WebAssembly.Memoryhandle as aWasmMemoryObject, which lets us directly grab theArrayBufferinstead of doing a property lookup in this hot path.