From d2c7c263d81043390755c5fb65f20ad78dcb0a8b Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 31 Jul 2022 17:07:52 +0300 Subject: [PATCH] update --- n-body/README.md | 12 ++++++------ n-body/asconfig.json | 3 ++- n-body/assembly/index.js | 1 - n-body/build/as_nbody.wasm | Bin 1829 -> 1780 bytes n-body/package.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) 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 ab5b4616ac7156eec2b3821cca0d6feae30675ed..ed87593b283c80e605b7ff13ce74f80fd5d1b0e8 100644 GIT binary patch delta 108 zcmZ3=_l0+Yi5@Q_b8220YhqG#=*$J!^pC6)>T&id=>`B9u96s8wST29NhYoTi6VE9M3=mZg6m`PCmt^Hu*oB F8UR1u6{-LL delta 185 zcmeyuyOeK&Nt!ehb8220YhqG&6b;*n_pDP#K6eR$-&IRz{twT#=yqSRL|(h zzzrtYwOCm)^D;{qm|2QTQVSSZS(8%pk~0|C*wa%>obppD8Q9^5a4>T4FfwiIxXLQp n%gDsw*u%l?V8eg_lXKV%#K2s~Gw4z)*wpwCDnYEtXW7&NA7vqf 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",