From: Chris Duncan Date: Sat, 11 Jan 2025 07:21:07 +0000 (-0800) Subject: Tweak timing output and add some context for the viewer. X-Git-Tag: v1.0.0~4 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=fa634779f62376c10f8ad2a044a8eae4e61cd411;p=nano-pow.git Tweak timing output and add some context for the viewer. --- 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.