nx_comms_perf_fetch.nx source
↩ module page · 45 lines · 3641 B
1// nx_comms_perf_fetch.nx -- THIN structured COMMS-PERFORMANCE research source organ. COMPOSES
2// nx_research_engine. Operator 2026-07-02: "s class exceed performant on research as of today so that
3// we get the best fps sound responsiveness". Grounds the PERF ladder on REAL sourced SOTA (Rule 4):
4// AUDIO responsiveness (Web Audio quantum/AudioWorklet vs the deprecated ScriptProcessor our client
5// uses; echo cancellation; audio-latency science), VIDEO fps (WebCodecs hw encode vs our JPEG-toBlob;
6// requestVideoFrameCallback; OffscreenCanvas; Motion-JPEG characteristics; frame-rate science),
7// NETWORK smoothness (jitter/packet-delay-variation = the NetEQ problem; end-to-end delay), and the
8// MEASUREMENT yardsticks (QoE; VMAF = the metric for the rival h2h). Banks -> knowledge/library/.
9// expect_exit: 0 license_tier: ORIGINAL
10import "nx_research_engine.nx"
11const K_MAGIC_8388608: i64 = 8388608
12
13func main() -> i64 {
14 let store: *TrustStore = rf_init()
15 if (store as i64) == 0 { rf_puts("perf: trust store load failed\n" as *u8); return 1 }
16 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- COMMS PERF research (fps / sound / responsiveness SOTA) -> Library\n" as *u8)
17 let cap: i64 = K_MAGIC_8388608
18 let out: *u8 = sys_mmap(cap)
19 var ok: i64 = 0
20
21 rf_section("SOUND -- low-latency audio path (the ScriptProcessor we ship is deprecated)" as *u8)
22 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Web_Audio_API" as *u8, "perf_webaudio" as *u8, store, out, cap)
23 ok = ok + rf_fetch_bank("https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet" as *u8, "perf_audioworklet" as *u8, store, out, cap)
24 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Echo_suppression_and_cancellation" as *u8, "perf_echo_cancel" as *u8, store, out, cap)
25 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Latency_(audio)" as *u8, "perf_audio_latency" as *u8, store, out, cap)
26
27 rf_section("FPS -- video encode/present path (JPEG-toBlob vs WebCodecs hw; paint timing)" as *u8)
28 ok = ok + rf_fetch_bank("https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API" as *u8, "perf_webcodecs" as *u8, store, out, cap)
29 ok = ok + rf_fetch_bank("https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/requestVideoFrameCallback" as *u8, "perf_rvfc" as *u8, store, out, cap)
30 ok = ok + rf_fetch_bank("https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas" as *u8, "perf_offscreencanvas" as *u8, store, out, cap)
31 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Motion_JPEG" as *u8, "perf_mjpeg" as *u8, store, out, cap)
32 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Frame_rate" as *u8, "perf_frame_rate" as *u8, store, out, cap)
33
34 rf_section("RESPONSIVENESS -- jitter, end-to-end delay (the adaptive-jitter-buffer problem)" as *u8)
35 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Packet_delay_variation" as *u8, "perf_jitter" as *u8, store, out, cap)
36 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/End-to-end_delay" as *u8, "perf_e2e_delay" as *u8, store, out, cap)
37
38 rf_section("YARDSTICKS -- how the h2h vs rivals gets SCORED" as *u8)
39 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Quality_of_experience" as *u8, "perf_qoe" as *u8, store, out, cap)
40 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Video_Multimethod_Assessment_Fusion" as *u8, "perf_vmaf" as *u8, store, out, cap)
41
42 rf_puts("PERF BANKED: "); rf_putn(ok); rf_puts(" / 13 (fps + sound + responsiveness SOTA; the perf census grounds on these)\n" as *u8)
43 if ok < 9 { return 51 }
44 return 0
45}