code wiki / _hdl_build / nx_js_sota_bench.nx

nx_js_sota_bench.nx

buildroot/runtime/_hdl_build/nx_js_sota_bench.nx

16430 B259 linesdepth 8pulls 24 transitivereach 0 importersview sourcekind benchtopic js
docsdependenciesstructsconstsfunctions

about

nx_js_sota_bench.nx -- JS-ENGINE SOTA BENCHMARK (operator 2026-07-07: "we want to get to state of the art on everything ... july 7th state of the art use the nishi researcher and build it out if it cant give us that benchmark"). A SEPARATE, SOVEREIGN benchmark organ (benchmarks-exist-separate + sovereign-benchmark-not-thirdparty doctrine): measures OUR two engines (tree-walker + bytecode VM) on standard kernel FAMILIES and ranks the result against the RESEARCH-GROUNDED 2026 architecture ladder -- no wave, BEHIND rows printed as BEHIND. RESEARCH GROUNDING (banked 2026-07-07 by nx_jsvm_sota_research_fetch over sovereign TLS, in knowledge/fetched/jsvm_*.raw, corpus-ingested): - jsvm_ignition.raw / jsvm_sparkplug.raw / jsvm_maglev.raw / jsvm_turbofan.raw: V8's 2026 tier ladder = Ignition (bytecode interpreter) -> Sparkplug (baseline JIT straight off bytecode) -> Maglev (mid-tier SSA JIT) -> TurboFan (optimizing JIT). WE ARE at the Ignition tier. - jsvm_hidden_classes.raw + jsvm_inline_caching.raw: SOTA property access = hidden classes (shapes) + inline caches -> O(1) monomorphic loads; OUR obj_find is a LINEAR key scan. - jsvm_gc_tracing.raw: SOTA = generational/tracing GC; OUR arena never frees (honest cap). - jsvm_spidermonkey.raw / jsvm_jsc.raw: same pillar set independently (Baseline+Warp/Ion; LLInt+Baseline+DFG+FTL) -> the pillars below are THE 2026 architecture axis, not V8 trivia. - jsvm_jetstream.raw / jsvm_browser_bench.raw: the field scores on JetStream/Speedometer-class suites; kernels below are our sovereign micro-equivalents (arith/property/calls/strings/ alloc/callbacks). bellard.org (QuickJS reference numbers) was TLS-unreachable (status 0) -- the interpreter-class band below is therefore an ORDER-OF-MAGNITUDE band, stated as such. CLASS BANDS (order-of-magnitude, hot int loop iters/sec on this box): interpreter-class >= 5M · baseline-JIT-class >= 100M · optimizing-JIT-class >= 500M. expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_js_vm.nx nx_js_sota_bench.nx

imports: nx_js_vm.nx

imported by: nobody (leaf or entry point)

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

main bw sb_kernel sys_now_us sys_mmap sys_clock_gettime_mono bsl compile_run cr_core jp_parse_source js_lex js_skip_trivia js_lex_one jp_parse_program jp_tok_kind jp_cur jp_err jp_parse_stmt jp_child_commit jp_new_node jp_pst ev_set c_scope_push c_program c_predecl jp_nkind jp_na jp_nb jp_child_at c_newslot ev_tok_start ev_tok_len c_predecl ↻ jp_nextra c_rootslot jp_nc ev_for_body ev_try_finally jp_nb ↻ jp_child_at ↻

structs

none

consts

26const SB_MAGIC_1000000: i64 = 1000000
27const SB_MAGIC_200000: i64 = 200000
28const SB_MAGIC_20000: i64 = 20000
29const SB_MAGIC_19999900000: i64 = 19999900000
30const SB_MAGIC_199990000: i64 = 199990000
31const SB_MAGIC_300000: i64 = 300000
32const SB_MAGIC_30000: i64 = 30000
33const SB_MAGIC_700000: i64 = 700000
34const SB_MAGIC_70000: i64 = 70000
35const SB_MAGIC_21891: i64 = 21891
36const SB_MAGIC_1973: i64 = 1973
37const SB_MAGIC_6765: i64 = 6765
38const SB_MAGIC_2000: i64 = 2000
39const SB_MAGIC_50000: i64 = 50000
40const SB_MAGIC_5000: i64 = 5000
41const SB_MAGIC_1249975000: i64 = 1249975000
42const SB_MAGIC_12497500: i64 = 12497500
43const SB_MAGIC_9990000: i64 = 9990000
44const SB_MAGIC_999000: i64 = 999000
46const SB_INTERP_MIN: i64 = 5000000 // iters/s: interpreter-class floor (band, see header)
47const SB_BASEJIT_MIN: i64 = 100000000 // iters/s: baseline-JIT-class floor
48const SB_OPTJIT_MIN: i64 = 500000000 // iters/s: optimizing-JIT-class floor

functions

50func sb_ops_per_sec(ops: i64, us: i64) -> i64 { var u: i64 = us; if u < 1 { u = 1 } return ops * SB_MAGIC_1000000 / u }
called by 1: sb_kernel
57func sb_kernel(vmsrc: *u8, trsrc: *u8, label: *u8, vmops: i64, trops: i64, expt: i64, vmexp: i64, trexp: i64, mbox: *i64) -> i64
90func sb_class_name(rate: i64) -> *u8
called by 1: main
96func sb_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: sb_rowmain
97func sb_wn(fd: i64, v: i64) -> i64
called by 1: main
111func sb_row(fd: i64, name: *u8, have: i64, note: *u8) -> i64
called by 1: main calls 1: sb_w
124func main(argc: i64, argv: *i64) -> i64