code wiki / (root) / nx_hash_bench_run.nx

nx_hash_bench_run.nx

buildroot/runtime/nx_hash_bench_run.nx

2374 B39 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind benchtopic hash
docsdependenciesstructsconstsfunctions

about

nx_hash_bench_run.nx -- measures + prints our SHA-1/SHA-256 hashing throughput. Run output is redirected to knowledge/status/hash_throughput.log (the first concrete hashing-MB/s figure in the field -- no incumbent publishes one). Timing = wall-clock, non-deterministic, single-run: a MEASUREMENT, not a gate. Correctness is gated by nx_hash_bench_test. exit 0 always (unless the KAT fails, which would mean broken crypto).

dependencies 2 imports · 0 importers

nx_hash_bench.nx nx_itoa_lib.nx nx_hash_bench_run.nx

imports: nx_hash_bench.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main nx_hb_sha1_ok sys_mmap sha1 sys_mmap ↻ sha1_process_block if_ge _r_puts nx_hb_sha256_ok sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ nx_hb_fill nx_hb_sha1_mbps sys_mmap ↻ sys_now_us sys_mmap ↻ sys_clock_gettime_mono sha1 ↻ nx_hb_sha256_mbps sys_mmap ↻ sys_now_us ↻ sha256_digest ↻ _r_putn nxi_out nxi_fd sys_mmap ↻

structs

none

consts

9const K_MAGIC_1000000: i64 = 1000000

functions

11func _r_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
16func _r_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
18func main() -> i64