Skip to content

Commit e4f0775

Browse files
authored
Some minor updates for n-body example (#20)
1 parent b50a5a2 commit e4f0775

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

n-body/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ Benchmark
3939
***Environment:***
4040

4141
- MacBook Pro (15-inch, 2019)
42-
- macOS 12.4.0
43-
- node.js v18.4.0
44-
- rustc 1.42.0-nightly (3a3f4a7cb 2019-12-28)
42+
- macOS 12.5.0
43+
- node.js v18.7.0
44+
- rustc 1.64.0-nightly (0f4bcadb4 2022-07-30)
4545

4646
***Results:***
4747

4848
| Target | Time, ***ms*** | Size, ***KB*** |
4949
|-------------------------|-----------------|----------------|
50-
| **AssemblyScript WASM** | **1599** | **1.8** |
51-
| JavaScript | 11608 | 5* |
52-
| Rust WASM | 1631 | 2 |
50+
| **AssemblyScript WASM** | **1606** | **1.8** |
51+
| JavaScript | 11640 | 5* |
52+
| Rust WASM | 1611 | 2 |
5353

5454
___* unminified___

n-body/asconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"options": {
33
"runtime": "stub",
4-
"importMemory": true,
4+
"initialMemory": 17,
5+
"noExportMemory": true,
56
"sourceMap": true
67
},
78
"targets": {

n-body/assembly/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const compiled = new WebAssembly.Module(
77

88
const imports = {
99
env: {
10-
memory: new WebAssembly.Memory({ initial: 10 }),
1110
abort: (_, line, column) => {
1211
throw Error("abort called at " + line + ":" + column);
1312
}

n-body/build/as_nbody.wasm

-49 Bytes
Binary file not shown.

n-body/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"rsbuild": "cd rust && RUSTFLAGS='-C link-arg=-s' cargo +nightly build --release",
1111
"build": "npm run asbuild && npm run tsbuild && npm run rsbuild",
1212
"start": "npx serve",
13-
"test": "node --no-wasm-bounds-checks --no-wasm-stack-checks --expose-gc tests"
13+
"test": "node --nowasm-bounds-checks --nowasm-stack-checks --noliftoff --expose-gc tests"
1414
},
1515
"devDependencies": {
1616
"assemblyscript": "latest",

0 commit comments

Comments
 (0)