From 3e921f3a20c4f504704e805eb1053d0e2d4bb106 Mon Sep 17 00:00:00 2001 From: Keith Miller Date: Thu, 29 May 2025 10:10:11 -0400 Subject: [PATCH] ZLib should check for _compressFile rather than _main to see if the module has been instantiated Since _main isn't exported by the module we end up recreating the instance/module on each iteration. --- wasm/zlib/benchmark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm/zlib/benchmark.js b/wasm/zlib/benchmark.js index d0544c70..4038c0e6 100644 --- a/wasm/zlib/benchmark.js +++ b/wasm/zlib/benchmark.js @@ -4,7 +4,7 @@ class Benchmark { async runIteration() { - if (!Module._main) + if (!Module._compressFile) await setupModule(Module); Module.FS.writeFile('input', Module.wasmBinary);