code wiki / (root) / nx_bench_popcount.nx

nx_bench_popcount.nx

buildroot/runtime/nx_bench_popcount.nx

3972 B96 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_popcount.nx -- microbenchmark for nx_popcount64. Times the cost of N = 1_000_000 popcount calls on pseudo-random i64 values. Uses nx_clock_monotonic_ns for nanosecond timing. Reports total elapsed ns + per-op ns + reference comparisons. Per S-class cardinal: every primitive must be measured and reported against known-language baselines. Substrate beats or matches all known on every axis.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_clock.nx nx_bit.nx nx_bench_popcount.nx

imports: nx_syscalls.nxnx_runtime.nxnx_clock.nxnx_bit.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 nx_clock_monotonic_ns sys_mmap ↻ sys_clock_gettime_mono nx_popcount64 nx_bits_popcount64 sys_write strlen print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻

structs

none

consts

22const STDOUT: i64 = 1
23const N_ITER: i64 = 1000000

functions

25func main() -> i64