nx_bench_collatz.nx
buildroot/runtime/nx_bench_collatz.nx
about
nx_bench_collatz.nx -- NishiLang twin of bench/xlang/collatz.c (branch-heavy).
Max Collatz stopping-time over [1,N) + XOR step checksum. Prints checksum then
elapsed_us. Checksum MUST equal the gcc AND clang builds (3rd-party oracles).
license_tier: ORIGINAL No hw writes (Rule 26).
(nx_syscalls_x86_64.nx import REMOVED 2026-07-31, debt 1785528831. This file already
gets the canonical syscall layer transitively via nx_clock.nx -> syscalls.nx. Importing
nx_syscalls_x86_64.nx as well put TWO syscall layers in one translation unit: every
wrapper defined twice, one against RAW x86 numbers and one against the @ifndef
TARGET_X86_64 RV64 numbers the backend translates at emit (SYS_POLL 7 vs 73). nx_cc
accepted the redefinition silently and let definition ORDER pick the numbering.)
dependencies 1 imports · 0 importers
imports: nx_clock.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
| 12 | const K_MAGIC_3000000: i64 = 3000000 |
| 13 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 14 | const K_MAGIC_1000003: i64 = 1000003 |
functions
| 16 | func bc_emit_i64(fd: i64, n: i64) -> i64 called by 1: main |
| 34 | func main() -> i64 |