summaryrefslogtreecommitdiff
path: root/bench/src/ziglyph_codepoint.zig
diff options
context:
space:
mode:
authorGravatar Sam Atman2025-05-16 13:13:01 -0400
committerGravatar Sam Atman2025-05-16 13:13:01 -0400
commit036923515ec05b07c381448402fc256d9c564c10 (patch)
treec3c170fb68f7504be8522acf8172977931541013 /bench/src/ziglyph_codepoint.zig
parentMerge stranded README changes from v0.14 release (diff)
downloadzg-036923515ec05b07c381448402fc256d9c564c10.tar.gz
zg-036923515ec05b07c381448402fc256d9c564c10.tar.xz
zg-036923515ec05b07c381448402fc256d9c564c10.zip
Remove benchmarks, ziglyph references
`ziglyph` is no longer maintained and basically abandoned, there's no need to keep the comparison between them active going forward.
Diffstat (limited to 'bench/src/ziglyph_codepoint.zig')
-rw-r--r--bench/src/ziglyph_codepoint.zig27
1 files changed, 0 insertions, 27 deletions
diff --git a/bench/src/ziglyph_codepoint.zig b/bench/src/ziglyph_codepoint.zig
deleted file mode 100644
index 7fe4028..0000000
--- a/bench/src/ziglyph_codepoint.zig
+++ /dev/null
@@ -1,27 +0,0 @@
1const std = @import("std");
2
3const CodePointIterator = @import("ziglyph").CodePointIterator;
4
5pub fn main() !void {
6 var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
7 defer arena.deinit();
8 const allocator = arena.allocator();
9
10 var args_iter = try std.process.argsWithAllocator(allocator);
11 _ = args_iter.skip();
12 const in_path = args_iter.next() orelse return error.MissingArg;
13
14 const input = try std.fs.cwd().readFileAlloc(
15 allocator,
16 in_path,
17 std.math.maxInt(u32),
18 );
19 defer allocator.free(input);
20
21 var iter = CodePointIterator{ .bytes = input };
22 var result: usize = 0;
23 var timer = try std.time.Timer.start();
24
25 while (iter.next()) |_| result += 1;
26 std.debug.print("Ziglyph CodePointIterator: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) });
27}