diff --git a/n-body/README.md b/n-body/README.md index 897cede..978235d 100644 --- a/n-body/README.md +++ b/n-body/README.md @@ -39,16 +39,16 @@ Benchmark ***Environment:*** - MacBook Pro (15-inch, 2019) -- macOS 12.4.0 -- node.js v18.4.0 -- rustc 1.42.0-nightly (3a3f4a7cb 2019-12-28) +- macOS 12.5.0 +- node.js v18.7.0 +- rustc 1.64.0-nightly (0f4bcadb4 2022-07-30) ***Results:*** | Target | Time, ***ms*** | Size, ***KB*** | |-------------------------|-----------------|----------------| -| **AssemblyScript WASM** | **1599** | **1.8** | -| JavaScript | 11608 | 5* | -| Rust WASM | 1631 | 2 | +| **AssemblyScript WASM** | **1606** | **1.8** | +| JavaScript | 11640 | 5* | +| Rust WASM | 1611 | 2 | ___* unminified___ diff --git a/n-body/asconfig.json b/n-body/asconfig.json index 89e7879..66f39fd 100644 --- a/n-body/asconfig.json +++ b/n-body/asconfig.json @@ -1,7 +1,8 @@ { "options": { "runtime": "stub", - "importMemory": true, + "initialMemory": 17, + "noExportMemory": true, "sourceMap": true }, "targets": { diff --git a/n-body/assembly/index.js b/n-body/assembly/index.js index 72239ed..223ae7d 100644 --- a/n-body/assembly/index.js +++ b/n-body/assembly/index.js @@ -7,7 +7,6 @@ const compiled = new WebAssembly.Module( const imports = { env: { - memory: new WebAssembly.Memory({ initial: 10 }), abort: (_, line, column) => { throw Error("abort called at " + line + ":" + column); } diff --git a/n-body/build/as_nbody.wasm b/n-body/build/as_nbody.wasm index ab5b461..ed87593 100644 Binary files a/n-body/build/as_nbody.wasm and b/n-body/build/as_nbody.wasm differ diff --git a/n-body/package.json b/n-body/package.json index 5b87d05..e3048a5 100644 --- a/n-body/package.json +++ b/n-body/package.json @@ -10,7 +10,7 @@ "rsbuild": "cd rust && RUSTFLAGS='-C link-arg=-s' cargo +nightly build --release", "build": "npm run asbuild && npm run tsbuild && npm run rsbuild", "start": "npx serve", - "test": "node --no-wasm-bounds-checks --no-wasm-stack-checks --expose-gc tests" + "test": "node --nowasm-bounds-checks --nowasm-stack-checks --noliftoff --expose-gc tests" }, "devDependencies": { "assemblyscript": "latest",