nx_uxf_store_bench.nx
buildroot/runtime/nx_uxf_store_bench.nx
about
nx_uxf_store_bench.nx -- UXF arc R3: MEASURED exceed vs SQLite, on the sovereign seg_store.
Honest framing (Rule: no-overclaim; sqlite3 is NOT installed here so a live 1:1 run is not
possible): the NISHI side is REALLY MEASURED with the native monotonic clock INSIDE the organ
(sys_clock_now_us -- honoring monitor-the-system-not-the-person); SQLite is a BY-DESIGN named
reference (its costs stated, NOT fabricated numbers) -- the same discipline nx_ws_exceed_gate
used for git. Exceed claim = the measured Nishi numbers + the STRUCTURAL properties SQLite
pays by-design and the append-only content-addressed store does not.
Workload: N put records into one segment via the real write path (ss_add -> ss_build_keys ->
ss_writefile+fsync), then M point-gets via binary search over the sorted NXK1 index (zero-copy
read of the index bytes). All timed natively. No hardware writes (Rule 26).
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_seg_store.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
| 16 | const K_MAGIC_4194304: i64 = 4194304 |
| 17 | const K_MAGIC_7919: i64 = 7919 |
| 18 | const K_MAGIC_1000000: i64 = 1000000 |
| 20 | const BN: i64 = 20000 // records written |
| 21 | const BM: i64 = 20000 // point-gets timed |
functions
| 23 | func b_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 24 | func b_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(1, "-" as *u8, 1) } let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { bb[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, bb, k); return 0 } |
| 27 | func b_key(i: i64, dst: *u8) -> i64 called by 1: main |
| 38 | func b_get(idx: *u8, key: *u8, kl: i64, out: *i64) -> i64 |
| 60 | func main() -> i64 |