simd: minor tweaks

This commit is contained in:
Mitchell Hashimoto
2024-02-07 09:28:56 -08:00
parent 46a887578a
commit 3c31217f3c
3 changed files with 10 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ const simd = @import("../simd/main.zig");
const UTF8Decoder = @import("../terminal/UTF8Decoder.zig");
const Args = struct {
mode: Mode = .baseline,
mode: Mode = .noop,
/// The size for read buffers. Doesn't usually need to be changed. The
/// main point is to make this runtime known so we can avoid compiler
@@ -40,7 +40,7 @@ const Mode = enum {
/// The baseline mode copies the data from the fd into a buffer. This
/// is used to show the minimal overhead of reading the fd into memory
/// and establishes a baseline for the other modes.
baseline,
noop,
/// libc wcwidth
wcwidth,
@@ -74,14 +74,14 @@ pub fn main() !void {
// Handle the modes that do not depend on terminal state first.
switch (args.mode) {
.baseline => try benchBaseline(reader, buf),
.noop => try benchNoop(reader, buf),
.wcwidth => try benchWcwidth(reader, buf),
.ziglyph => try benchZiglyph(reader, buf),
.simd => try benchSimd(reader, buf),
}
}
noinline fn benchBaseline(
noinline fn benchNoop(
reader: anytype,
buf: []u8,
) !void {