code wiki / _hdl_build / nx_benchmark.nx

nx_benchmark.nx

buildroot/runtime/_hdl_build/nx_benchmark.nx

8609 B167 linesdepth 2pulls 2 transitivereach 15 importersview sourcekind benchtopic benchmark
docsdependenciesstructsconstsfunctions

about

nx_benchmark.nx -- TRUE competitive benchmarking, not cherry-picking (operator: a recurring flaw -- pick a few random features and declare "we suck" or "we exceed", ignoring the hundreds of features the competitor has AND ignoring what we built). The fix is a METHODOLOGY that REFUSES to issue a verdict until the comparison is actually COMPLETE: 1. ENUMERATE the competitor's full known feature surface (a COUNT you cannot hide behind). 2. COMPLETENESS GATE -- if the comparison covers too small a fraction of that surface, it is CHERRY-PICKED and NO verdict is allowed (the exact flaw, caught). 3. WEIGHTED COVERAGE both ways -- features weighted by importance, our support of theirs AND their support of ours (so we neither pretend to match their breadth nor erase our unique strengths). 4. HONEST VERDICT -- only when valid: AHEAD / PARITY / BEHIND, or DIFFERENTIATED when each side covers little of the other (we play different games -- the honest answer that is neither "we suck" nor "we exceed"). The Critic/Examiner ENFORCE bm_is_valid before any competitive claim is published. license_tier: ORIGINAL.

dependencies 1 imports · 11 importers

nx_syscalls.nx nx_benchmark.nx nx_benchmark_release_gate_t179.nx nx_benchmark_test.nx nx_cms_census.nx nx_competitive_census.nx nx_dominance_test.nx nx_galx_census.nx nx_kernel_census.nx nx_perf_rehearsal.nx nx_portability_census.nx nx_sclass_claim.nx

diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_benchmark_release_gate_t179.nxnx_benchmark_test.nxnx_cms_census.nxnx_competitive_census.nxnx_dominance_test.nxnx_galx_census.nxnx_kernel_census.nxnx_perf_rehearsal.nxnx_portability_census.nxnx_sclass_claim.nxnx_voxel_census.nx

structs

none

consts

17const BM_REFUSE: i64 = 0 // benchmark incomplete (cherry-picked) -> NO verdict
18const BM_AHEAD: i64 = 1
19const BM_PARITY: i64 = 2
20const BM_BEHIND: i64 = 3
21const BM_DIFFERENTIATED: i64 = 4 // each covers little of the other -> different games, not better/worse
59const BM_DOMINATES: i64 = 1 // better-or-equal on ALL, better on >=1 -> a REAL exceed
60const BM_TRADEOFF: i64 = 2 // better on some, WORSE on others -> NOT better, just different costs
61const BM_DOMINATED: i64 = 3 // worse-or-equal on all -> they win
62const BM_EQUAL: i64 = 4
93const BM_RELEASE_PASS:i64=1
94const BM_RELEASE_FAIL:i64=2
95const BM_RELEASE_UNKNOWN:i64=3
96const BM_RELEASE_INVALID:i64=4
97const BM_I64_MAX:i64=9223372036854775807
98const BM_RATIO_SCALE:i64=1000

functions

24func bm_completeness(compared: i64, total_known: i64) -> i64
called by 2: bm_is_validmain
30func bm_is_valid(compared: i64, total_known: i64, threshold: i64) -> i64
37func bm_weighted_coverage(n: i64, importance: *i64, support: *i64) -> i64
called by 1: main
46func bm_verdict(valid: i64, our_cov_of_them: i64, their_cov_of_us: i64) -> i64
65func bm_dim_cmp(our_v: i64, their_v: i64, higher_better: i64) -> i64
called by 1: bm_dominance
73func bm_dominance(n: i64, ours: *i64, theirs: *i64, higher_better: *i64) -> i64
called by 1: main calls 1: bm_dim_cmp
89func bm_exceed_honest(dominance: i64) -> i64 { if dominance == BM_DOMINATES { return 1 } return 0 }
called by 1: main
100func bm_release_merge(a:i64,b:i64)->i64
called by 2: mainpr_validate
108func bm_release_fact(fact:i64)->i64
115func bm_release_freshness(now:i64,observed:i64,max_age:i64)->i64
called by 2: mainpr_validate
123func bm_release_trials(trials:i64,minimum:i64,duration:i64,min_duration:i64)->i64
called by 2: mainpr_validate
131func bm_release_ratio_limit(value:i64,ratio:i64)->i64
called by 1: bm_release_metric
141func bm_release_metric(measured:i64,candidate:i64,incumbent:i64,c_uncertainty:i64,i_uncertainty:i64,absolute_budget:i64,relative_permil:i64)->i64
160func bm_release_quality(quality:i64,allow_tradeoff:i64,approval:i64)->i64
called by 2: mainpr_validate calls 1: bm_release_fact