nx_sha256_perf_test.nx
buildroot/runtime/nx_sha256_perf_test.nx
about
nx_sha256_perf_test.nx -- bench substrate SHA-256 on a fixed input.
Hashes a deterministic 64 KiB buffer N=20 times in a loop, captures
in-program wall-clock via sys_clock_gettime_mono (substrate's mono
clock). Prints elapsed nanoseconds + N + bytes-per-iteration so a
shell wrapper can compute MB/s.
Same input + N=20 will run against system sha256sum for honest
substrate-vs-incumbent comparison.
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_sha256.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
| 18 | const BUF_BYTES: i64 = 65536 // 64 KiB |
| 19 | const N_ITER: i64 = 20 // 1.25 MiB total work |
functions
| 21 | func _print_i64(label: *u8, label_len: i64, v: i64) -> i64 |
| 47 | func main() -> i64 |