From 94f8f443d3e31abd0e472f026d494d958089fe63 Mon Sep 17 00:00:00 2001 From: FallenSigh Date: Wed, 8 Jul 2026 03:18:19 +0800 Subject: [PATCH] add mlkem test results --- doc/mlkem_test_results.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/doc/mlkem_test_results.md b/doc/mlkem_test_results.md index 99543a7..3458788 100644 --- a/doc/mlkem_test_results.md +++ b/doc/mlkem_test_results.md @@ -26,24 +26,20 @@ Final result for the isolated diagnostic run: ## Performance -### Multi-level isolated diagnostic +The following results are from isolated per-level runs. Each level was tested +for 100 iterations with software-only, CPU register path, and DMA path separated. | Level | SW avg cycles | CPU avg cycles | DMA avg cycles | CPU vs SW | DMA vs SW | DMA vs CPU | |---|---:|---:|---:|---:|---:|---:| -| k=2 / ML-KEM-512 | 19,684,481 | 432,358 | 189,105 | 45.5x | 104.1x | 2.29x | -| k=3 / ML-KEM-768 | 30,688,338 | 638,556 | 283,023 | 48.1x | 108.4x | 2.26x | -| k=4 / ML-KEM-1024 | 2,355,875 | 872,400 | 392,433 | 2.70x | 6.00x | 2.22x | - -### k=4 recheck - -| Level | SW avg cycles | CPU avg cycles | DMA avg cycles | CPU vs SW | DMA vs SW | DMA vs CPU | -|---|---:|---:|---:|---:|---:|---:| -| k=4 / ML-KEM-1024 | 6,025,486 | 718,672 | 388,959 | 8.39x | 15.49x | 1.85x | +| k=2 / ML-KEM-512 | 2,587,784 | 352,684 | 185,671 | 7.34x | 13.94x | 1.90x | +| k=3 / ML-KEM-768 | 4,056,378 | 523,656 | 279,588 | 7.75x | 14.51x | 1.87x | +| k=4 / ML-KEM-1024 | 6,025,486 | 718,672 | 388,959 | 8.38x | 15.49x | 1.85x | ## Notes - CPU/DMA hardware paths were stable across 100 iterations for all levels. -- The software path showed run-to-run variance earlier; the custom allocator improved stability, but the k=4 recheck should be used as the cleaner reference for reporting. -- For the hardware accelerator claim, the most stable headline is: - - DMA path is about 2.2x faster than CPU register path. - - Hardware path is substantially faster than software, but the exact SW speedup depends on the software run used as baseline. +- Software, CPU register path, and DMA path all passed 100 iterations for k=2, k=3, and k=4. +- The DMA path is 13.94x to 15.49x faster than software across the tested levels. +- The CPU register path is 7.34x to 8.38x faster than software across the tested levels. +- The DMA path is about 1.85x to 1.90x faster than the CPU register path. +- The hardware advantage increases slightly as k grows, because the accelerated computation grows faster than the fixed software control overhead.