code wiki / (root) / nx_ghash_bench.nx

nx_ghash_bench.nx

buildroot/runtime/nx_ghash_bench.nx

2150 B56 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind benchtopic ghash
docsdependenciesstructsconstsfunctions

about

nx_ghash_bench.nx -- throughput: bit-by-bit GF(2^128) reference vs the PCLMULQDQ backend. Same fixed block hashed N times each way (models GHASH over a large message). Prints ms + MB/s for both and the speedup. Correctness is gated separately (nx_ghash_clmul_gate); this is purely a perf measurement. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_ghash.nx nx_ghash_clmul.nx nx_ghash_bench.nx

imports: nx_syscalls.nxnx_ghash.nxnx_ghash_clmul.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nx_ghash_mul_bitwise sys_mmap ↻ nx_ghash_mul_clmul gh_scratch sys_mmap ↻ gh_byterev_bits gh_revtab sys_mmap ↻ gh_revbyte gh_clmul_core gh_scratch ↻ gh_clmul_mul256_acc gh_scratch ↻ gh_clmul_reduce256 gh_lshr b_ps sys_write b_pn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

12const K_MAGIC_200000: i64 = 200000
13const K_MAGIC_1000000: i64 = 1000000

functions

15func b_ps(s: *u8, n: i64) -> i64 { sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
16func b_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
25func main() -> i64