]> git.codecow.com Git - nano25519.git/commitdiff
Explain how speed is calculated.
authorChris Duncan <chris@zoso.dev>
Tue, 14 Apr 2026 07:16:20 +0000 (00:16 -0700)
committerChris Duncan <chris@zoso.dev>
Tue, 14 Apr 2026 07:16:20 +0000 (00:16 -0700)
index.html

index b23fe1152d442a32c8d03992a0eb35872e137a3e..8439d4f081552882532b57f6ab2089703c678071 100644 (file)
@@ -462,7 +462,25 @@ SPDX-License-Identifier: GPL-3.0-or-later
        <h1>nano25519</h1>
        <h4><a href="https://www.npmjs.com/package/nano25519">https://www.npmjs.com/package/nano25519</a></h4>
        <h2>Speed test for nano25519</h2>
-       <p>Times below are in milliseconds and are summarized by various averaging methods.</p>
+       <p>This test compares different Ed25519 implementations by running a sequence of functions. A random 32-byte value is generated for a message and private key, and then the test uses the values to derive a public key, sign the message, and verify the signature.</p>
+       <ul>
+               <li>Each derive-sign-verify sequence is timed as a unit.</li>
+               <li>Each test is comprised of the specified iterations of sequence units.</li>
+               <li>Each test run is comprised of the specified iterations of tests.</li>
+       </ul>
+       <p>The final score is displayed as "sequences-per-second" and is calculated as follows:</p>
+       <ol>
+               <li>For each test run:
+                       <ol>
+                               <li>Collect all the derive-sign-verify sequence timings for the test run.</li>
+                               <li>Truncate the results by eliminating the fastest 10% and slowest 10% of sequence timings.</li>
+                               <li>Calculate the arithmetic mean (average) of the truncated results.</li>
+                       </ol>
+               </li>
+               <li>Collect the truncated arithmetic means from all test runs.</li>
+               <li>Truncate the results by eliminating the fastest 10% and slowest 10% of test runs.</li>
+               <li>Calculate the harmonic mean of the truncated results.</li>
+       </ol>
        <hr />
        <label for="signature">Verify Signature</label>
        <div class="hex"><input id="signature" type="text" /></div>