From: Chris Duncan Date: Thu, 16 Jan 2025 05:02:19 +0000 (-0800) Subject: Fix rate reporting. Add benchmarks. X-Git-Tag: v2.0.0~57 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=b884e4fd99698d4b143ddfa5fa20ab37de44fef8;p=nano-pow.git Fix rate reporting. Add benchmarks. --- diff --git a/benchmarks.md b/benchmarks.md index 3246e05..ed39a4e 100644 --- a/benchmarks.md +++ b/benchmarks.md @@ -109,6 +109,59 @@ NanoPow (WebGPU) 3070 (dispatch 0x1000 workgroup 32) } +NanoPow (WebGPU) 3070 (dispatch 0x800 workgroup 64) +{ + "count": 64, + "total": 14740.50000000745, + "rate": 4.341779451169747, + "min": 14.199999999254942, + "max": 1088.800000000745, + "arithmetic": 230.32031250011642, + "truncated": 181.82343750004657, + "harmonic": 87.12614438828882, + "geometric": 149.3650172355075 +} + +NanoPow (WebGPU) 3070 (dispatch 0x800 workgroup 256) +{ + "count": 64, + "total": 15690.999999988824, + "rate": 4.078771270157771, + "min": 10.400000002235174, + "max": 989.8000000007451, + "arithmetic": 245.17187499982538, + "truncated": 186.7796874998021, + "harmonic": 76.98798798236564, + "geometric": 147.89606519234277 +} + +NanoPow (WebGPU) 3070 (dispatch 0x800 workgroup 256) +{ + "count": 64, + "total": 16779.50000002235, + "rate": 4.4576316046016, + "min": 24.199999999254942, + "max": 1552, + "arithmetic": 262.17968750034925, + "truncated": 224.33437500032596, + "harmonic": 108.25402886637463, + "geometric": 169.6307793361205 +} + +NanoPow (WebGPU) 3070 (dispatch 0x1000 workgroup 64) +{ + "count": 64, + "total": 19302.5, + "rate": 4.219075495082348, + "min": 27.699999999254942, + "max": 1248.5, + "arithmetic": 301.6015625, + "truncated": 237.01874999998836, + "harmonic": 112.89841890437856, + "geometric": 188.28065698087113 +} + + ----- @@ -627,6 +680,7 @@ Geometric: 231.43806657572657 ms Minimum: 31.900000035762787 ms Maximum: 954.9000000357628 ms + NanoPow (WebGPU) iPhone 0xff { "count": 32, @@ -650,3 +704,4 @@ NanoPow (WebGPU) iPad Mini 2 0x400 "harmonic": 1722.7691, "geometric": 4127.4107 } + diff --git a/test.html b/test.html index 112a0eb..4710f0b 100644 --- a/test.html +++ b/test.html @@ -42,7 +42,7 @@ SPDX-License-Identifier: GPL-3.0-or-later return { count: count, total: sum, - rate: count / sum * 1000, + rate: count / truncated * 1000, min: min, max: max, arithmetic: sum / count, @@ -53,10 +53,10 @@ SPDX-License-Identifier: GPL-3.0-or-later } function print (times) { - const { arithmetic, count, geometric, harmonic, min, max, total, truncated } = average(times) + const { arithmetic, count, geometric, harmonic, min, max, rate, total, truncated } = average(times) console.log(`Count: ${count} nonces`) console.log(`Total: ${total} ms`) - console.log(`Rate: ${count} nonces/second`) + console.log(`Rate: ${rate} nonces/second`) console.log(`Minimum: ${min} ms`) console.log(`Maximum: ${max} ms`) console.log(`Arithmetic Mean: ${arithmetic} ms`)