]> zoso.dev Git - nano-pow.git/commitdiff
Fix rate reporting. Add benchmarks.
authorChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 05:02:19 +0000 (21:02 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 16 Jan 2025 05:02:19 +0000 (21:02 -0800)
benchmarks.md
test.html

index 3246e055a651c2b61ba66add2bd8c0147af34b0e..ed39a4ea17d91f8b10ac43317e8690978ba12d92 100644 (file)
@@ -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
 }
+
index 112a0ebadba31dd90d767eccdbd268e715930239..4710f0beeee5233407d242172b3ffff754b0523e 100644 (file)
--- 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`)