Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 107c4cc

Browse files
authored
Include link to gist for benchmark
See issue #3.
1 parent 6185199 commit 107c4cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

proposals/bulk-memory-operations/Overview.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ This is the core loop:
3838
let end = performance.now();
3939
```
4040

41+
The code for the benchmark can be found [here](https://gist.github.com/binji/b8e8bc0c0121235d9f1668bc447c7f8c).
42+
Note that this will not run properly without a WebAssembly implementation of `move_memory`. For my tests, I
43+
hacked a version of v8 to replace any exported function called `memcpy` or `memmove` with a new function with
44+
the following contents:
45+
46+
```wasm
47+
(func (param $dst i32) (param $src i32) (param $size i32) (result i32)
48+
get_local $dst
49+
get_local $src
50+
get_local $size
51+
move_memory
52+
get_local $dst)
53+
```
54+
4155
Here are the results on my machine (x86_64, 2.9GHz, L1 32k, L2 256k, L3 256k):
4256

4357
| | intrinsic | i64 load/store x 4 | i64 load/store x 2 | i32 load/store x 2 | i32 load/store |
@@ -59,6 +73,7 @@ Here are the results on my machine (x86_64, 2.9GHz, L1 32k, L2 256k, L3 256k):
5973
| size=512.0Kib, N=2048 | 29.994 Gib/s | 10.090 Gib/s | 7.627 Gib/s | 3.985 Gib/s | 2.785 Gib/s |
6074
| size=1.0Mib, N=1024 | 11.760 Gib/s | 10.091 Gib/s | 7.959 Gib/s | 3.989 Gib/s | 2.787 Gib/s |
6175

76+
6277
## Design
6378

6479
This proposal introduces 2 new instructions:

0 commit comments

Comments
 (0)