summaryrefslogtreecommitdiff
path: root/test/lib/bench.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/bench.zig')
-rw-r--r--test/lib/bench.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lib/bench.zig b/test/lib/bench.zig
index f2127dc4..7e945064 100644
--- a/test/lib/bench.zig
+++ b/test/lib/bench.zig
@@ -34,10 +34,10 @@ pub fn main(init: std.process.Init) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
// to the middle, into insert mode
- for ([_]pe.Key{ .{ .cp = '%', .text = "%" }, .{ .cp = ';', .text = ";" } }) |k| _ = ed.key(arena.allocator(), k);
+ for ([_]pe.Key{ .{ .cp = '%', .text = "%" }, .{ .cp = ';', .text = ";" } }) |k| _ = ed.key(arena.allocator(), null, k);
var to_middle: [8]u8 = undefined;
- for (std.fmt.bufPrint(&to_middle, "{d}G", .{text.items.len / 2 / 32}) catch unreachable) |c| _ = ed.key(arena.allocator(), .{ .cp = c, .text = &.{c} });
- _ = ed.key(arena.allocator(), .{ .cp = 'i', .text = "i" });
+ for (std.fmt.bufPrint(&to_middle, "{d}G", .{text.items.len / 2 / 32}) catch unreachable) |c| _ = ed.key(arena.allocator(), null, .{ .cp = c, .text = &.{c} });
+ _ = ed.key(arena.allocator(), null, .{ .cp = 'i', .text = "i" });
_ = arena.reset(.free_all);
if (keys == 0) return;
@@ -48,7 +48,7 @@ pub fn main(init: std.process.Init) !void {
for (0..keys) |n| {
if (count_pages) before.* = ed.*;
const t0 = now();
- const out = ed.key(arena.allocator(), .{ .cp = 'a' + @as(u21, @intCast(n % 26)), .text = &.{'a' + @as(u8, @intCast(n % 26))} });
+ const out = ed.key(arena.allocator(), null, .{ .cp = 'a' + @as(u21, @intCast(n % 26)), .text = &.{'a' + @as(u8, @intCast(n % 26))} });
key_ns += now() - t0;
if (out != .done) return error.NotTyped;
_ = arena.reset(.retain_capacity);