code wiki / (root) / nx_qplan_gate.nx

nx_qplan_gate.nx

buildroot/runtime/nx_qplan_gate.nx

4095 B62 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_qplan_gate.nx -- proves the cost-based planner CHOOSES CORRECTLY, matching the reality the parexec bench measured: small data -> sequential (fork not worth it); large bandwidth-bound scan -> sequential (parallel loses, measured 0.66x); large compute-bound -> parallel (measured 3.10x). Also proves the estimates are internally ordered and monotone. Known cost profiles, deterministic. D001 via nx_gate_verdict.

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_qplan.nx nx_qplan_gate.nx

imports: nx_gate_verdict.nxnx_qplan.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap gv_head gv_puts sys_write gv_check gv_puts ↻ qg_eq qp_choose qp_cost_seq qp_conf sys_openat_rd sys_mmap ↻ sys_read sys_close qp_atoi_rng qp_cost_par qp_conf ↻ qp_cost_par ↻ qp_cost_seq ↻ qp_conf ↻ gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close ↻

structs

none

consts

none

functions

8func qg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
10func main() -> i64