code wiki / (root) / nx_bench_divpow2.nx

nx_bench_divpow2.nx

buildroot/runtime/nx_bench_divpow2.nx

2144 B57 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_divpow2.nx -- NishiLang twin of bench/xlang/divpow2.c. Signed divide-by-power-of-two over NEGATIVE + positive + INT_MIN dividends (the round-toward-zero bias path collatz never hits). Checksum bit-exact vs gcc AND clang = the correctness oracle for the G7 sign-bias sequence. 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 via nx_clock.nx -> syscalls.nx, so importing the raw-x86 module too put TWO syscall layers in one TU -- every wrapper twice, numbering picked by definition ORDER, silently.)

dependencies 1 imports · 0 importers

nx_clock.nx nx_bench_divpow2.nx

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

main nx_clock_monotonic_ns sys_mmap sys_clock_gettime_mono bd_emit_i64

structs

none

consts

11const K_MAGIC_60000000: i64 = 60000000
12const K_MAGIC_1234567891011: i64 = 1234567891011
13const K_MAGIC_2654435761: i64 = 2654435761
14const K_MAGIC_1024: i64 = 1024
15const K_MAGIC_9223372036854775807: i64 = 9223372036854775807
16const K_MAGIC_4096: i64 = 4096

functions

18func bd_emit_i64(fd: i64, n: i64) -> i64
called by 1: main
36func main() -> i64