From 5a7aad7de8278877cb48bea2829084e71fd48db2 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 30 Nov 2024 22:28:21 -0800 Subject: [PATCH] Add legacy wallet to performance test. --- test/perf.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/perf.mjs b/test/perf.mjs index bfc2ae3..760be10 100644 --- a/test/perf.mjs +++ b/test/perf.mjs @@ -1,6 +1,13 @@ import * as N from '../dist/index.js' +console.log(`wallet...`) const wallet = N.wallet.generate() let now = performance.now() -const accounts = N.wallet.accounts(wallet.seed, 0, 0x2000) -console.log(`${-now + (now = performance.now())} ms`) +N.wallet.accounts(wallet.seed, 0, 0x2000) +console.log(`${performance.now() - now} ms`) + +console.log(`wallet legacy...`) +const walletLegacy = N.wallet.generateLegacy() +now = performance.now() +N.wallet.legacyAccounts(walletLegacy.seed, 0, 0x2000) +console.log(`${performance.now() - now} ms`) -- 2.34.1