code wiki / (root) / nx_bench_fnv.nx

nx_bench_fnv.nx

buildroot/runtime/nx_bench_fnv.nx

2073 B52 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_fnv.nx -- NishiLang twin of bench/xlang/fnv.c. FNV-1a over an LCG byte stream (multiply+xor). Prints hash then elapsed_us. (x>>33)&0xff is sign-shift agnostic (result low byte = x bits 33..40, identical for sar/shr) so the checksum is bit-exact vs the gcc AND clang uint64 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 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_fnv.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 bf_emit_i64

structs

none

consts

11const K_MAGIC_200000000: i64 = 200000000
12const K_MAGIC_1469598103934665603: i64 = 1469598103934665603
13const K_MAGIC_6364136223846793005: i64 = 6364136223846793005
14const K_MAGIC_1442695040888963407: i64 = 1442695040888963407
15const K_MAGIC_1099511628211: i64 = 1099511628211

functions

17func bf_emit_i64(fd: i64, n: i64) -> i64
called by 1: main
35func main() -> i64