code wiki / _hdl_build / nx_fkbench.nx
nx_fkbench.nx
buildroot/runtime/_hdl_build/nx_fkbench.nx
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
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
structs
| none |
consts
| 7 | const FK_MAXN: i64 = 32 |
| 8 | const FK_INTSZ: i64 = 8 |
| 9 | const FK_DEFAULT_N: i64 = 11 // 11! = 39.9M perms; checksum 556355 maxflips 51 |
| 10 | const FK_REPEAT: i64 = 5 |
functions
| 12 | func fannkuch_redux(n: i64, out: *i64) -> i64 |
| 65 | func 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 } |
| 70 | func fk_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 72 | func main() -> i64 |