code wiki / _hdl_build / nx_fkbench.nx

nx_fkbench.nx

buildroot/runtime/_hdl_build/nx_fkbench.nx

3317 B91 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_fkbench.nx -- fannkuch-redux(N) sovereign runtime bench (fixed clock: sys_now_us). Identical hot loop to nx_clbg_fannkuch.nx; times FK_REPEAT enumerations to compare nx_cc codegen RUNTIME vs gcc -O2/-O3 on the SAME algorithm (per-rung compiler grade).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_fkbench.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_now_us sys_mmap ↻ sys_clock_gettime_mono fannkuch_redux sys_mmap ↻ fk_puts sys_write fk_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

7const FK_MAXN: i64 = 32
8const FK_INTSZ: i64 = 8
9const FK_DEFAULT_N: i64 = 11 // 11! = 39.9M perms; checksum 556355 maxflips 51
10const FK_REPEAT: i64 = 5

functions

12func fannkuch_redux(n: i64, out: *i64) -> i64
called by 1: main calls 1: sys_mmap
65func fk_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
70func fk_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
72func main() -> i64