Skip to content

🛤 Bulk memory operations #1114

Closed
Closed
@binji

Description

@binji

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 #236 #977 #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 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions