nx_bounds_perf.nx
buildroot/runtime/nx_bounds_perf.nx
about
nx_bounds_perf.nx -- the COST side of the spatial-safety rung.
A hot loop over a fixed array [1024]i64 with a RUNTIME index, which is exactly the shape
emit_bounds_check instruments. Compiled by two compilers that differ ONLY in the
NX_BOUNDS_CHECK_LIVE const, the delta between the two runs IS the overhead -- no modelling,
no estimate. Prints microseconds and the checksum (the checksum also keeps the loop alive
against dead-code elimination, and proves both builds computed the SAME answer).
dependencies 1 imports · 0 importers
imports: nx_fmt.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
| 9 | const N_ELEM: i64 = 1024 |
| 10 | const N_ITER: i64 = 20000 |
functions
| 12 | func main() -> i64 |