aboutsummaryrefslogtreecommitdiff
path: root/docs/PERFORMANCE.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/PERFORMANCE.md')
-rw-r--r--docs/PERFORMANCE.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/PERFORMANCE.md b/docs/PERFORMANCE.md
index 2e668c2..daab3c2 100644
--- a/docs/PERFORMANCE.md
+++ b/docs/PERFORMANCE.md
@@ -25,6 +25,24 @@ The targets are in [README section 18](../README.md#18-performance-budgets). Thi
## Results
+### M2, 2026-10-18 (version 0.2.0, crypto and OTP primitives)
+
+`test/BenchTest.mc`, simulator in Docker, average per call (identical within noise on all four test devices):
+
+| Operation | Time | Notes |
+| --- | --- | --- |
+| TOTP, SHA-1 | 0.35 ms | HMAC built on the native SHA-1 |
+| TOTP, SHA-256 | 0.05 ms | Native HMAC-SHA256 |
+| TOTP, SHA-512 | 17.5 ms | SHA-512 in Monkey C; was 27.9 ms before inlining the rotations |
+| PBKDF2, 1000 iterations | 52 ms | Was 89 ms before removing the per-iteration wipe; native HMAC alone is about 3 ms |
+| Seal + open a record | 0.25 ms | AES-256-CBC + HMAC-SHA256, two HKDF key derivations cached |
+| Start-up self-test | 6.7 ms | All known-answer tests |
+| PBKDF2 calibration for 1 s | about 12,000 iterations | In the simulator; the watch will choose far fewer |
+
+`make perf` and `make memtest` with the larger app: in-app start-up 1 to 7 ms; launch to first frame rose from 6.5 s to 10.5 s, because `monkeydo` now sends a larger debug program (crypto code and debug information), still under its 15 s guard. Memory after the first frame: 2.3 % (768 KB watches) to 3.4 % (Forerunner 255S). The signed package for 72 products is 1.5 MB.
+
+What this means for the watch, to be confirmed with the on-watch benchmark in M4: the simulator runs on a desktop CPU, so absolute times will be many times higher on the Forerunner 70. The ratios hold: SHA-512 entries cost about 50 times as much as SHA-1 entries, and Monkey C loop overhead, not the native HMAC, dominates PBKDF2. If the watch manages fewer than 2,000 PBKDF2 iterations per second, unlocking takes longer than the 1 s target (the lower bound is kept for security); M8 can move more of the XOR work into native calls.
+
### M0, 2026-10-18 (version 0.1.0, placeholder app)
Simulator in Docker on your PC (12 cores), debug builds: