You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copying and clearing large memory regions is very common, and making these
operations fast is architecture dependent. Although this can be done in the MVP
via i32.load and i32.store, this requires more bytes of code and forces VMs
to recognize the loops as well. The following operators can be added to improve
performance:
move_memory: Copy data from a source memory region to destination region;
these regions may overlap: the copy is performed as if the source region was
first copied to a temporary buffer, then the temporary buffer is copied to
the destination region
set_memory: Set all bytes in a memory region to a given byte
We expect that WebAssembly producers will use these operations when the region
size is known to be large, and will use loads/stores otherwise.
The text was updated successfully, but these errors were encountered:
This is a tracking issue for a post-MVP feature
It will be updated as the issue progresses.
Topic Bulk memory operations
Champion Ben Smith @binji
Status in progress
Phase Feature proposal
Linked issues WebAssembly/design#236 WebAssembly/design#977 WebAssembly/design#1057
Linked repositories bulk-memory-operations
Details
Copying and clearing large memory regions is very common, and making these
operations fast is architecture dependent. Although this can be done in the MVP
via
i32.load
andi32.store
, this requires more bytes of code and forces VMsto recognize the loops as well. The following operators can be added to improve
performance:
move_memory
: Copy data from a source memory region to destination region;these regions may overlap: the copy is performed as if the source region was
first copied to a temporary buffer, then the temporary buffer is copied to
the destination region
set_memory
: Set all bytes in a memory region to a given byteWe expect that WebAssembly producers will use these operations when the region
size is known to be large, and will use loads/stores otherwise.
The text was updated successfully, but these errors were encountered: