code wiki / _hdl_build / nx_race_search_worker.nx

nx_race_search_worker.nx

buildroot/runtime/_hdl_build/nx_race_search_worker.nx

7255 B194 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic race
docsdependenciesstructsconstsfunctions

about

nx_race_search_worker.nx -- the SOVEREIGN LANE of the IM6b SEARCH race (beat-sqlite-FTS5 on the team-log corpus). Same logical work as the competitor lane, self-timing ONLY the engine work (parse excluded): write <prefix>: index the unique team-log lines -> chunked committed segments (fsync'd, .keys + .terms/.post) -> SOVW us= count= query <prefix>: open-store handle + the shared 9-query set (6 terms + 3 ANDs) x 200 iterations -> SOVQ us= q0=..q8= Per-query counts are printed for the orchestrator's correctness cross-check against the FTS5 lane (counts must MATCH or the race is INVALID -- correctness before speed). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_seg_store.nx nx_race_search_worker.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main rs_p sys_write sys_mmap rs_parse_file sys_mmap ↻ ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close rs_streq sys_now_us sys_mmap ↻ sys_clock_gettime_mono ss_begin ss_begin_cap sys_mmap ↻ ss_cat ss_catn sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_segname ss_cat ↻

structs

none

consts

15const RS_MAGIC_1000000000: i64 = 1000000000
16const RS_MAGIC_2097152: i64 = 2097152
18const RS_ITERS: i64 = 200
19const RS_MAXDOCS: i64 = 4000

functions

21func rs_p(s: *u8) -> i64
called by 1: main calls 1: sys_write
32func rs_pn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
34func rs_streq(a: *u8, b: *u8) -> i64
called by 1: main
45func rs_parse_file(path: *u8, pool: *u8, pooloff: *i64, ptrs: *i64, lens: *i64, n0: i64) -> i64
called by 1: main calls 2: sys_mmapss_readall
93func main(argc: i64, argv: *i64) -> i64