nx_hash_bench.nx
buildroot/runtime/nx_hash_bench.nx
about
nx_hash_bench.nx -- piece-hashing throughput benchmark (SHA-1 + SHA-256).
module: nishi-core.torrent.hash_bench
depends: nx_sha1.nx, nx_sha256.nx, nx_syscalls.nx
capability: CORE_COMPUTE
wired_status: FULLY_WIRED
Hashing is the torrent client's #1 CPU cost (rqbit's maintainer states "CPU is spent mostly
on SHA-1 checksumming"; libtorrent v2 adds SHA-256 per 16 KiB leaf). The 2026-06 research pass
found a striking gap: NO incumbent publishes a concrete hashing MB/s number anywhere -- "the
oracle you'll have to generate yourself." So this is the leaderboard's column 7: we measure our
sovereign crypto core's SHA-1 and SHA-256 throughput and publish the first concrete figure in
the field. Correctness is KAT-gated (deterministic); the MB/s value is a wall-clock measurement
(sys_now_us), reported informationally -- timing is NOT replayable, so it never gates.
dependencies 3 imports · 2 importers
imports: nx_sha1.nxnx_sha256.nxnx_syscalls.nx
imported by: nx_hash_bench_run.nxnx_hash_bench_test.nx
structs
| none |
consts
| none |
functions
| 21 | func nx_hb_fill(buf: *u8, n: i64) -> i64 |
| 29 | func nx_hb_sha1_mbps(buf: *u8, n: i64, iters: i64) -> i64 |
| 41 | func nx_hb_sha256_mbps(buf: *u8, n: i64, iters: i64) -> i64 |
| 53 | func nx_hb_sha1_ok() -> i64 |
| 62 | func nx_hb_sha256_ok() -> i64 |