Commit 3a605f72 authored by nagayama15's avatar nagayama15

Improve benchmark.js

parent ff8a3eaf
...@@ -6,13 +6,13 @@ const rawData = Crypto.randomBytes(size); ...@@ -6,13 +6,13 @@ const rawData = Crypto.randomBytes(size);
(async function () { (async function () {
const libPaths = [ const libPaths = [
'./zlib-sample.wasm', `zlib-sample.wasm`,
'./zlib-funcord.wasm', `zlib-funcord.wasm`,
'./zlib-opswap.wasm', `zlib-opswap.wasm`,
'./zlib-funcord-opswap.wasm', `zlib-funcord-opswap.wasm`,
]; ];
const libs = await Promise.all(libPaths.map(async path => await require('./zlib').initialize(path))); const libs = await Promise.all(libPaths.map(async path => await require('./zlib').initialize(`${__dirname}/${path}`)));
const compressed = libs[0].deflate(rawData); const compressed = libs[0].deflate(rawData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment