New
v0.12.0
What's Changed
- fix parametrized benchmarks by @FObersteiner in https://github.com/hendriknielaender/zBench/pull/133
API Change: Benchmark run Function Signature
The run function signature for benchmark implementations has changed to use pointer receivers instead of value receivers.
Before:
pub fn run(self: MyBenchmark, _: std.mem.Allocator) void {
// ...
}
After:
pub fn run(self: *MyBenchmark, _: std.mem.Allocator) void {
// ...
}
Migration Guide:
Update all benchmark struct run function signatures to accept self as a pointer (*MyBenchmark) instead of a value (MyBenchmark).
Related: Issue #131
Notes
- This is a mandatory API change requiring updates to all benchmark implementations
- Pointer receivers provide better control over memory semantics and prevent compiler-driven implicit pointer passing
Full Changelog: https://github.com/hendriknielaender/zBench/compare/v0.11.1...v0.12.0