File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -561,3 +561,22 @@ static signature validation check. This could be improved by allowing:
561
561
check of a call to a heterogeneous table;
562
562
* any other specific GC reference type, effectively allowing WebAssembly code
563
563
to implement a variety of rooting API schemes.
564
+
565
+ ### Memset and Memcpy Operators
566
+
567
+ Copying and clearing large memory regions is very common, and making these
568
+ operations fast is architecture dependent. Although this can be done in the MVP
569
+ via ` i32.load ` and ` i32.store ` , this requires more bytes of code and forces VMs
570
+ to recognize the loops as well. The following operators can be added to improve
571
+ performance:
572
+
573
+ * ` move_memory ` : Copy data from a source memory region to destination region;
574
+ these regions may overlap: the copy is performed as if the source region was
575
+ first copied to a temporary buffer, then the temporary buffer is copied to
576
+ the destination region
577
+ * ` set_memory ` : Set all bytes in a memory region to a given byte
578
+
579
+ We expect that WebAssembly producers will use these operations when the region
580
+ size is known to be large, and will use loads/stores otherwise.
581
+
582
+ TODO: determine how these operations interact w/ shared memory.
You can’t perform that action at this time.
0 commit comments