Skip to content

Commit

Permalink
feat: zero-alloc size computation
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Jan 7, 2025
1 parent 566ad98 commit 7c7f2ea
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 64 deletions.
4 changes: 2 additions & 2 deletions assembly/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const item: Item = {
}
};

bs.ensureSize(2048);
// bs.ensureSize(2048);
console.log(JSON.stringify(vec));
bs.ensureSize(2048);
// bs.ensureSize(2048);
console.log(JSON.stringify(item));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"test": "rm -rf ./build/ && ast test",
"build:bench": "rm -rf ./build/ && asc assembly/__benches__/misc.bench.ts -o ./build/bench.wasm --textFile ./build/bench.wat --transform ./transform --optimizeLevel 3 --shrinkLevel 0 --converge --noAssert --uncheckedBehavior always --runtime incremental --enable simd --enable bulk-memory",
"build:test": "rm -rf ./build/ && JSON_DEBUG=true asc assembly/test.ts --transform ./transform -o ./build/test.wasm --textFile ./build/test.wat -O3 --enable simd --runtime stub",
"build:test": "rm -rf ./build/ && JSON_DEBUG=true asc assembly/test.ts --transform ./transform -o ./build/test.wasm --textFile ./build/test.wat --optimizeLevel 3 --shrinkLevel 0 --enable simd --runtime stub",
"build:transform": "tsc -p ./transform",
"test:wasmtime": "wasmtime ./build/test.wasm",
"test:wasmer": "wasmer ./build/test.wasm",
Expand Down
72 changes: 42 additions & 30 deletions transform/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c7f2ea

Please sign in to comment.