code wiki / (root) / nx_native_array_sum_bench.nx

nx_native_array_sum_bench.nx

buildroot/runtime/nx_native_array_sum_bench.nx

1184 B42 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind benchtopic native
docsdependenciesstructsconstsfunctions

about

nx_native_array_sum_bench.nx -- memory-bound native micro-bench. Where nx_native_tightloop_bench tests register-only arithmetic (compiler best case), this bench streams through a 1M-element i64 array and sums it. Memory-bound: 8MB doesn't fit L1; streams through L2/L3. Returns (sum & 0xFF) as exit code so shell time can measure without printing. Native target requires nx_syscalls.nx for mmap.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_native_array_sum_bench.nx

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

main sys_mmap

structs

none

consts

12const K_MAGIC_1000000: i64 = 1000000

functions

14func main() -> i64
calls 1: sys_mmap