summaryrefslogtreecommitdiff
path: root/bench/src/ziglyph_case.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-07-18 08:04:58 -0400
committerGravatar Jose Colon Rodriguez2024-07-18 08:04:58 -0400
commit7ddce488e074c3f052949ba513a340446cea86e9 (patch)
treed546332da78d3cb061c9b98c72f6b39c8a394b2e /bench/src/ziglyph_case.zig
parentMerge pull request 'refactor CodePoint.Iterator into a reusable fn' (#11) fro... (diff)
downloadzg-7ddce488e074c3f052949ba513a340446cea86e9.tar.gz
zg-7ddce488e074c3f052949ba513a340446cea86e9.tar.xz
zg-7ddce488e074c3f052949ba513a340446cea86e9.zip
Fixed benchmark duration printing
Diffstat (limited to 'bench/src/ziglyph_case.zig')
-rw-r--r--bench/src/ziglyph_case.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/src/ziglyph_case.zig b/bench/src/ziglyph_case.zig
index 2b49e5a..f6dfbc1 100644
--- a/bench/src/ziglyph_case.zig
+++ b/bench/src/ziglyph_case.zig
@@ -27,7 +27,7 @@ pub fn main() !void {
27 const lower = try ziglyph.toLowerStr(allocator, line); 27 const lower = try ziglyph.toLowerStr(allocator, line);
28 result += upper.len + lower.len; 28 result += upper.len + lower.len;
29 } 29 }
30 std.debug.print("Ziglyph toUpperStr/toLowerStr: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); 30 std.debug.print("Ziglyph toUpperStr/toLowerStr: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) });
31 31
32 result = 0; 32 result = 0;
33 iter.reset(); 33 iter.reset();
@@ -37,5 +37,5 @@ pub fn main() !void {
37 if (ziglyph.isUpperStr(line)) result += 1; 37 if (ziglyph.isUpperStr(line)) result += 1;
38 if (ziglyph.isLowerStr(line)) result += 2; 38 if (ziglyph.isLowerStr(line)) result += 2;
39 } 39 }
40 std.debug.print("Ziglyph isUpperStr/isLowerStr: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); 40 std.debug.print("Ziglyph isUpperStr/isLowerStr: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) });
41} 41}