code wiki / (root) / nx_p256_fieldmul_bench.nx

nx_p256_fieldmul_bench.nx

buildroot/runtime/nx_p256_fieldmul_bench.nx

1429 B43 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind benchtopic p256
docsdependenciesstructsconstsfunctions

about

nx_p256_fieldmul_bench.nx -- a NON-const-foldable P-256 field-mul benchmark. The point-loop bench derives everything from the constant generator G, so opt const-folds the field arithmetic away. This seeds the inputs from a RUNTIME clock and chains a=field_mul(a,b) (data-dependent), so opt MUST emit the real field_mul loop -- a valid workload for measuring field_mul (G2/G3). The return folds in the runtime seed so the whole computation is live. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_p256_field.nx nx_p256_field_mul.nx nx_p256_fieldmul_bench.nx

imports: nx_syscalls.nxnx_u256.nxnx_p256_field.nxnx_p256_field_mul.nx

imported by: nobody (leaf or entry point)

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

main nx_scratch_save nx_scratch_init sys_mmap sys_now_us sys_mmap ↻ sys_clock_gettime_mono u256_alloc nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ p256_field_mul nx_scratch_save ↻ u256_wide_alloc nx_scratch ↻ u256_mul_wide _p256_solinas_reduce u256_alloc ↻ p256_field_load_p nx_scratch ↻ _r_reduce9 _r_cmp8 nx_scratch_restore nx_scratch_restore ↻

structs

none

consts

13const K_MAGIC_2654435761: i64 = 2654435761
14const K_MAGIC_40503: i64 = 40503
15const K_MAGIC_200000: i64 = 200000

functions

17func main() -> i64