From: Chris Duncan Date: Thu, 21 Nov 2024 06:04:28 +0000 (-0800) Subject: Worker threads do not seem to improve BLAKE2b ckd much, but BIP-44 ckd is 5x faster... X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=40a24151ca7f5735ff90a7b2d05cb35a9e501ce2;p=libnemo.git Worker threads do not seem to improve BLAKE2b ckd much, but BIP-44 ckd is 5x faster. This commit saves the work, and the next commit will clean up the logging and old functions. --- diff --git a/src/lib/wallet.ts b/src/lib/wallet.ts index 2581de7..b2be001 100644 --- a/src/lib/wallet.ts +++ b/src/lib/wallet.ts @@ -415,7 +415,7 @@ export class Bip44Wallet extends Wallet { * @param {number} index - Index of the account * @returns {Promise} */ - async ckd (index: number | number[]): Promise { + async ckd_old (index: number | number[]): Promise { if (!Array.isArray(index)) index = [index] const keys = [] let now = performance.now() @@ -443,7 +443,7 @@ export class Bip44Wallet extends Wallet { * @param {number} index - Index of the account * @returns {Promise} */ - async ckd_new (index: number | number[]): Promise { + async ckd (index: number | number[]): Promise { if (!Array.isArray(index)) index = [index] const data: any = [] let now = performance.now() @@ -603,7 +603,7 @@ export class Blake2bWallet extends Wallet { * @param {number} index - Index of the account * @returns {Promise} */ - async ckd (index: number | number[]): Promise { + async ckd_old (index: number | number[]): Promise { if (!Array.isArray(index)) index = [index] const keys = [] let now = performance.now() @@ -632,7 +632,7 @@ export class Blake2bWallet extends Wallet { * @param {number} index - Index of the account * @returns {Promise} */ - async ckd_new (index: number | number[]): Promise { + async ckd (index: number | number[]): Promise { if (!Array.isArray(index)) index = [index] const data: any = [] let now = performance.now()