code wiki / _hdl_build / nx_recycler_bench_measure.nx
nx_recycler_bench_measure.nx
buildroot/runtime/_hdl_build/nx_recycler_bench_measure.nx
about
nx_recycler_bench_measure.nx -- turn the benchmark's BETTER scores from design-facts into MEASURED numbers
(no-wave / measured-exceed). It measures, on THIS machine, a trivial native Nishi ELF (nx_min): (1) STARTUP =
avg fork+exec+exit time over N runs via the monotonic microsecond clock; (2) BINARY SIZE = the ELF's byte count.
HONEST: Nishi's numbers are MEASURED here; the competitor baselines (JVM cold start, runtime size) are DOCUMENTED
/ well-known and explicitly NOT run by us (we don't ship a JVM). Build nx_min first so /tmp/nx_min.sov.elf exists;
run this ELF DIRECTLY (it forks). Self-gating. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 8 | const K_MAGIC_50000: i64 = 50000 |
| 9 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 11 | func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func gn(v0: i64) -> i64 { var v: i64=v0; if v<0{sys_write(1,"-" as *u8,1);v=0-v} let b: *u8=sys_mmap(24); var k: i64=0; if v==0{b[0]=48 as u8;k=1} while v>0{b[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k{o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 15 | func run_once(path: *u8) -> i64 |
| 33 | func main() -> i64 |