From fa634779f62376c10f8ad2a044a8eae4e61cd411 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 10 Jan 2025 23:21:07 -0800 Subject: [PATCH] Tweak timing output and add some context for the viewer. --- test.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test.html b/test.html index 2849d5c..9d3b3c6 100644 --- a/test.html +++ b/test.html @@ -35,25 +35,27 @@ SPDX-License-Identifier: GPL-3.0-or-later if (i > (count * 0.1) && i < (count * 0.9)) truncated += times[i] } return { + count: count, total: sum, + min: min, + max: max, arithmetic: sum / count, - harmonic: count / reciprocals, - geometric: Math.exp(logarithms / count), truncated: truncated / count, - min: min, - max: max + harmonic: count / reciprocals, + geometric: Math.exp(logarithms / count) } } function print (times) { - const { arithmetic, geometric, harmonic, min, max, total, truncated } = average(times) + const { arithmetic, count, geometric, harmonic, min, max, total, truncated } = average(times) + console.log(`Count: ${count} ms`) console.log(`Total: ${total} ms`) - console.log(`Average: ${arithmetic} ms`) - console.log(`Harmonic: ${harmonic} ms`) - console.log(`Geometric: ${geometric} ms`) - console.log(`Truncated: ${truncated} ms`) console.log(`Minimum: ${min} ms`) console.log(`Maximum: ${max} ms`) + console.log(`Arithmetic Mean: ${arithmetic} ms`) + console.log(`Truncated Mean: ${truncated} ms`) + console.log(`Harmonic Mean: ${harmonic} ms`) + console.log(`Geometric Mean: ${geometric} ms`) } @@ -125,6 +127,7 @@ SPDX-License-Identifier: GPL-3.0-or-later

NanoPowGpu uses cutting edge WebGPU technology. Not all browsers are supported.

NanoPowGl uses WebGL 2.0 and is a fallback option in the NanoPow package.

nano-webgl-pow is the original package from which NanoPow was inspired and optimized.

+

Times below are in milliseconds and summarized by various averaging methods.



 	
-- 2.47.3