-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.15.0-dev.1438+242102f9d
Steps to Reproduce and Observed Behavior
Filling a file with zeroes with splatByteAll
writes one byte at a time and is very slow.
pub fn main() !void {
const out_file = try std.fs.cwd().createFile("output", .{ .truncate = true });
var buf: [4096]u8 = @splat(0);
var w = out_file.writer(&buf);
try w.interface.splatByteAll(0, 100_000_000);
}
const std = @import("std");
Expected Behavior
I expected splatByteAll
to use the writer buffer and write as many bytes at a time as possible.
squeek502
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior