]> zoso.dev Git - nano-pow.git/commitdiff
Add calculation rate to benchmarks.
authorChris Duncan <chris@zoso.dev>
Tue, 14 Jan 2025 16:47:55 +0000 (08:47 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 14 Jan 2025 16:47:55 +0000 (08:47 -0800)
benchmarks.md
test.html

index 1055b5d86abb183a06c07463268932cbd8d82392..1e5deec036182aeabffffd46d0f335c0e3c56b07 100644 (file)
@@ -200,6 +200,31 @@ NanoPow (WebGPU) 0x400
        "geometric": 166.5867151432514
 }
 
+NanoPow (WebGPU) 3070 (0x400)
+{
+       "count": 512,
+       "total": 138190.59999987483,
+       "min": 9.799999997019768,
+       "max": 1512.5999999940395,
+       "arithmetic": 269.9035156247555,
+       "truncated": 201.92070312495343,
+       "harmonic": 90.32084803883801,
+       "geometric": 166.60778722043577
+}
+
+NanoPow (WebGPU) 3070 (0x400)
+{
+       "count": 512,
+       "total": 139817.9999998659,
+       "rate": 3.6619033314772853,
+       "min": 11.599999994039536,
+       "max": 1748.4000000059605,
+       "arithmetic": 273.08203124973807,
+       "truncated": 202.18183593745925,
+       "harmonic": 92.89356260079113,
+       "geometric": 168.54025739379932
+}
+
 
 
 NanoPowGpu: Time to calculate proof-of-work for a send block 32 times
index b5d0d882b6efa18e7fb3e44380ee44e47e3115b7..9310bea5b389743f997cdfde54ae55dd4058b10c 100644 (file)
--- a/test.html
+++ b/test.html
@@ -29,7 +29,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
                }
 
                function average (times) {
-                       let count = times.length, sum = 0, reciprocals = 0, logarithms = 0, truncated = 0, min = 0xffff, max = 0
+                       let count = times.length, sum = 0, reciprocals = 0, logarithms = 0, truncated = 0, min = 0xffff, max = 0, rate = 0
                        times.sort()
                        for (let i = 0; i < count; i++) {
                                sum += times[i]
@@ -42,6 +42,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
                        return {
                                count: count,
                                total: sum,
+                               rate: count / sum * 1000,
                                min: min,
                                max: max,
                                arithmetic: sum / count,
@@ -53,8 +54,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
 
                function print (times) {
                        const { arithmetic, count, geometric, harmonic, min, max, total, truncated } = average(times)
-                       console.log(`Count: ${count} ms`)
+                       console.log(`Count: ${count} nonces`)
                        console.log(`Total: ${total} ms`)
+                       console.log(`Rate: ${count} nonces/second`)
                        console.log(`Minimum: ${min} ms`)
                        console.log(`Maximum: ${max} ms`)
                        console.log(`Arithmetic Mean: ${arithmetic} ms`)