Zero threshold benchmark (vectors)
+16.0569471600238 average on 512 when logging mapAsync only
+
{
"NanoPow (WebGPU) | Effort: 8 | Dispatch: 4194304 | Threads: 268435456": {
"count": 512,
// Read results back to Javascript and then unmap buffer after reading
let data = null
+ let start
try {
+ start = performance.now()
await this.#cpuBuffer.mapAsync(GPUMapMode.READ)
+ console.log(performance.now() - start)
await this.#device.queue.onSubmittedWorkDone()
data = new DataView(this.#cpuBuffer.getMappedRange().slice(0))
this.#cpuBuffer.unmap()
console.error(err)
}
const end = performance.now()
- const isValid = (await NanoPow.validate(work, hash, { threshold: 0 })) ? 'VALID' : 'INVALID'
+ // const isValid = (await NanoPow.validate(work, hash, { threshold: 0 })) ? 'VALID' : 'INVALID'
+ const isValid = 'Valid'
times.push(end - start)
const msg = `${isValid} [${work}] ${hash} (${end - start} ms)`
// console.log(msg)