Skip to content

Commit 6e2f3d0

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

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
@@ -176,9 +176,9 @@ noinline fn cross3ScaleBiasBenchmark(allocator: std.mem.Allocator, comptime coun
176176
std.debug.print("{s:>42} - ", .{"cross3, scale, bias benchmark (AOS)"});
177177

178178
var data0 = try std.ArrayList([3]f32).initCapacity(allocator, 256);
179-
defer data0.deinit(allocator);
179+
defer data0.deinit();
180180
var data1 = try std.ArrayList([3]f32).initCapacity(allocator, 256);
181-
defer data1.deinit(allocator);
181+
defer data1.deinit();
182182

183183
var i: usize = 0;
184184
while (i < 256) : (i += 1) {

0 commit comments

Comments
 (0)