From 166b683ec4cb0fd3baf04307d9c5636b8099ed40 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 27 Aug 2026 07:44:15 -0700 Subject: [PATCH] Test bulk speed improvement with random inputs instead of repeated. --- test/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/index.html b/test/index.html index 80a14d6..87542cd 100644 --- a/test/index.html +++ b/test/index.html @@ -374,15 +374,15 @@ SPDX-License-Identifier: GPL-3.0-or-later document.getElementById('status').innerHTML = `TESTING IN PROGRESS. THIS MAY TAKE A LONG TIME. ${i}/${runs} ${j}/${size}
` let start, end, duration, blockhash, privateKey, publicKey, signature start = end = duration = 0 - blockHash = random() privateKey = random() try { if (api === 'nano25519 with bulk block verification') { publicKey = derive(privateKey, 'nano25519') - signature = sign(blockHash, privateKey, publicKey, 'nano25519') const blocks = [] for (let i = 0; i < 341; i++) { + blockHash = random() + signature = sign(blockHash, privateKey, publicKey, 'nano25519') blocks[i] = { hash: blockHash, signature } } start = performance.now() @@ -396,6 +396,8 @@ SPDX-License-Identifier: GPL-3.0-or-later signTimes[i].push(0) verifyTimes[i].push(duration) } else { + blockHash = random() + start = performance.now() publicKey = derive(privateKey, api) end = performance.now() -- 2.52.0