code wiki / _hdl_build / nx_poly1305_bench.nx

nx_poly1305_bench.nx

buildroot/runtime/_hdl_build/nx_poly1305_bench.nx

4030 B91 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind benchtopic poly1305
docsdependenciesstructsconstsfunctions

about

nx_poly1305_bench.nx -- throughput bench for the SCALAR Poly1305 (same verified 5x26-bit-limb code as nx_poly1305_gate). MACs a 16384-byte buffer 65536 times = 1 GiB; wall-time -> MB/s. Tells us whether the AEAD is Poly1305-bound (need SIMD) or ChaCha-bound (scalar suffices, ChaCha already exceeds). Time it: compile->nxasm->elf, then `time ./elf`. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_poly1305_bench.nx

imports: nx_syscalls.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 poly1305 sys_mmap ↻ u8to32 poly_block u8to32 ↻ sys_write

structs

none

consts

6const K_MAGIC_16384: i64 = 16384
7const K_MAGIC_65536: i64 = 65536

functions

9func u8to32(p: *u8, o: i64) -> i64
called by 2: poly_blockpoly1305
13func poly_block(m: *u8, off: i64, hibit: i64, h: *i64, r: *i64, s: *i64) -> i64
called by 1: poly1305 calls 1: u8to32
39func poly1305(key: *u8, msg: *u8, mlen: i64, tag: *u8) -> i64
called by 1: main calls 3: sys_mmapu8to32poly_block
76func main() -> i64