code wiki / (root) / nx_p256_pointloop_bench.nx

nx_p256_pointloop_bench.nx

buildroot/runtime/nx_p256_pointloop_bench.nx

1333 B33 linesdepth 8pulls 9 transitivereach 0 importersview sourcekind benchtopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_pointloop_bench.nx -- reusable crypto perf workload for codegen A/B. A field-op-heavy P-256 point loop (double + add): long mem-bound limb chains, the real critical path where register residency (G1) pays off. Per-iter arena framing keeps memory constant. Used by bench/nx_codegen_ab.sh as a standing "racing crew" benchmark for any backend/codegen change (G1/G2/G3/...). expect_exit: deterministic (same under any correct codegen) -- A/B compares it.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_p256_field.nx nx_p256_point.nx nx_p256_point_add.nx nx_p256_pointloop_bench.nx

imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_point.nxnx_p256_point_add.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main p256_point_alloc nx_scratch nx_scratch_init sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable nxa_dump_sizes nx_scratch_oom sys_write ↻ sys_exit ↻ sys_mmap ↻ u256_alloc nx_scratch ↻ p256_field_one u256_one u256_zero p256_field_zero u256_zero ↻ p256_point_load_g p256_field_one ↻ p256_point_double p256_point_is_infinity u256_is_zero p256_point_zero p256_field_one ↻ p256_field_zero ↻ u256_is_zero ↻ nx_scratch_save nx_scratch_init ↻ u256_alloc ↻

structs

none

consts

12const K_MAGIC_50000: i64 = 50000

functions

14func main() -> i64