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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃洡 Bulk memory operations #18

binji opened this Issue Oct 16, 2018 · 0 comments


None yet
2 participants
Copy link

binji commented Oct 16, 2018

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


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, this requires more bytes of code and forces VMs
to recognize the loops as well. The following operators can be added to improve

  • 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can鈥檛 perform that action at this time.