From fc9834d217f6b08449870bbef05487cf6f1931e4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 16 Jan 2025 11:03:05 -0800 Subject: [PATCH] Update dispatch size defaults to reflect the fact that 0x800 was fastest and so Effort of 8 is middle of the road and a good starting point for benchmarking. --- src/classes/gpu.ts | 2 +- test.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/gpu.ts b/src/classes/gpu.ts index 3a9fc00..bb079ba 100644 --- a/src/classes/gpu.ts +++ b/src/classes/gpu.ts @@ -236,7 +236,7 @@ export class NanoPowGpu { start = performance.now() const random = Math.floor(Math.random() * 0xffffffff) const seed = (BigInt(random) << 32n) | BigInt(random) - const data = await this.#dispatch(this.#searchPipeline, seed, hash, threshold, effort * 0x200) + const data = await this.#dispatch(this.#searchPipeline, seed, hash, threshold, effort * 0x100) nonce = data.getBigUint64(0, true) this.#busy = !data.getUint32(8) times.push(performance.now() - start) diff --git a/test.html b/test.html index 310e3df..bc26e0a 100644 --- a/test.html +++ b/test.html @@ -89,7 +89,7 @@ SPDX-License-Identifier: GPL-3.0-or-later console.log(`%cNanoPow (${type})`, 'color:green', `Calculate proof-of-work for ${size} unique send block hashes`) const times = [] - document.getElementById('output').innerHTML += `Now testing: NanoPow (${type}) | Dispatch: ${(effort * 0x200) ** 2} | Threads/Dispatch: ${64 * ((effort * 0x200) ** 2)}
` + document.getElementById('output').innerHTML += `Now testing: NanoPow (${type}) | Dispatch: ${(effort * 0x100) ** 2} | Threads/Dispatch: ${8 * 8 * ((effort * 0x100) ** 2)}
` for (let i = 0; i < size; i++) { const hash = random() let work = null -- 2.34.1