]> zoso.dev Git - nano-pow.git/commitdiff
Update dispatch size defaults to reflect the fact that 0x800 was fastest and so Effor...
authorChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 19:03:05 +0000 (11:03 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 19:03:05 +0000 (11:03 -0800)
src/classes/gpu.ts
test.html

index 3a9fc00e9a19f01a0953682b69ff07180f926cba..bb079ba21036f0b46852d063256e8cf42a683047 100644 (file)
@@ -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)
index 310e3df3fc3eecb4d8e671e0e4a6a70d2f22238c..bc26e0ae90b7515353906f2ca05b778bfcdf702f 100644 (file)
--- 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)}<br/>`
+                       document.getElementById('output').innerHTML += `Now testing: NanoPow (${type}) | Dispatch: ${(effort * 0x100) ** 2} | Threads/Dispatch: ${8 * 8 * ((effort * 0x100) ** 2)}<br/>`
                        for (let i = 0; i < size; i++) {
                                const hash = random()
                                let work = null