2610b8cf56785ac5ea9b1aba478c05800ace2c4b
Examples covering the main usage patterns:
- bench_append_u8: per-iteration heap work, demonstrates B/op tracking
via the wrapped allocator.
- bench_sha256_64: set_bytes() for throughput in MB/s.
- bench_integer_sum: shows the optimization pitfall with a comment —
trivial loop bodies need an in-loop b.keep to survive ReleaseFast.
- bench_hash_sizes: parent that delegates to sub-benchmarks via b.run,
printed as `hash_sizes/sha256_<size>`.
- memset_{16,256,4096}: comptime-parametric benchmark generation via
std.fmt.comptimePrint + a generic gen_bench factory.
Includes a stand-alone examples/bench/build.zig illustrating the
zbench_build.add_bench_step integration a downstream project would use.
Description
No description provided
Languages
Zig
100%