code wiki / _hdl_build / nx_dtroundtrip_bench.nx
nx_dtroundtrip_bench.nx
buildroot/runtime/_hdl_build/nx_dtroundtrip_bench.nx
about
nx_dtroundtrip_bench.nx -- dt_parse -> dt_serialize round-trip on a REAL page.
Grades the 07-23 claim "the DOM parse->mutate->serialize round-trip EMPTIES real pages"
under the sealed-terminator-fixed compiler. GREEN iff: out_bytes >= 60% of in_bytes,
a known content marker survives, and the whole trip stays under 2s.
Usage: nx_dtroundtrip_bench <htmlfile> <marker-cstr>
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_domtree.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 8 | const K_MAGIC_65536: i64 = 65536 |
| 9 | const K_MAGIC_2000: i64 = 2000 |
functions
| 11 | func rt_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 12 | func rt_pn(v: i64) -> i64 |
| 21 | func rt_has(buf: *u8, blen: i64, needle: *u8) -> i64 called by 1: main |
| 36 | func main(argc: i64, argv: *i64) -> i64 |