Skip to content

Commit f044ffa

Browse files
hazeycodeCopilot
andauthored
benchmark: prealloc arrays
Co-authored-by: Copilot <[email protected]>
1 parent a847d50 commit f044ffa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/benchmark.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ noinline fn mat4MulBenchmark(allocator: std.mem.Allocator, comptime count: compt
8383
std.debug.print("{s:>42} - ", .{"matrix mul benchmark (AOS)"});
8484

8585
var data0 = try std.ArrayList([16]f32).initCapacity(allocator, 64);
86-
defer data0.deinit(allocator);
86+
defer data0.deinit();
8787
var data1 = try std.ArrayList([16]f32).initCapacity(allocator, 64);
88-
defer data1.deinit(allocator);
88+
defer data1.deinit();
8989

9090
var i: usize = 0;
9191
while (i < 64) : (i += 1) {

0 commit comments

Comments
 (0)