nx_p256_comb_bench.nx
buildroot/runtime/nx_p256_comb_bench.nx
about
nx_p256_comb_bench.nx -- does the fixed-base comb (p256_scalar_mul_base, precomputed G-table) beat
generic double-and-add (p256_scalar_mul) enough to justify wiring it into the ECDSA verify's u1*G?
Table built ONCE (amortized, as it would be cached live). Dependent-chain (DCE/hoist-proof).
Correctness pre-check: comb == generic for the same scalar (the nx_p256_comb_test guarantee, re-run
here on the bench scalars). expect_exit: 0 license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_p256_comb.nxnx_p256_scalar_mul.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const N_MAGIC_1000000000: i64 = 1000000000 |
| 11 | const N_ITER: i64 = 2000 |
functions
| 13 | func bp(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 14 | func bn(v: i64) -> i64 |
| 20 | func now_ns(ts: *i64) -> i64 { __syscall(SYS_CLOCK_GETTIME, 1, ts as i64, 0, 0, 0, 0); return ts[0] * N_MAGIC_1000000000 + ts[1] } called by 1: main |
| 22 | func main() -> i64 |