diff options
| author | 2024-07-18 08:04:58 -0400 | |
|---|---|---|
| committer | 2024-07-18 08:04:58 -0400 | |
| commit | 7ddce488e074c3f052949ba513a340446cea86e9 (patch) | |
| tree | d546332da78d3cb061c9b98c72f6b39c8a394b2e /bench/src/zg_normalize.zig | |
| parent | Merge pull request 'refactor CodePoint.Iterator into a reusable fn' (#11) fro... (diff) | |
| download | zg-7ddce488e074c3f052949ba513a340446cea86e9.tar.gz zg-7ddce488e074c3f052949ba513a340446cea86e9.tar.xz zg-7ddce488e074c3f052949ba513a340446cea86e9.zip | |
Fixed benchmark duration printing
Diffstat (limited to 'bench/src/zg_normalize.zig')
| -rw-r--r-- | bench/src/zg_normalize.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bench/src/zg_normalize.zig b/bench/src/zg_normalize.zig index fb0d4ee..1e2cfab 100644 --- a/bench/src/zg_normalize.zig +++ b/bench/src/zg_normalize.zig | |||
| @@ -30,7 +30,7 @@ pub fn main() !void { | |||
| 30 | const nfkc = try normalize.nfkc(allocator, line); | 30 | const nfkc = try normalize.nfkc(allocator, line); |
| 31 | result += nfkc.slice.len; | 31 | result += nfkc.slice.len; |
| 32 | } | 32 | } |
| 33 | std.debug.print("zg Normalize.nfkc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); | 33 | std.debug.print("zg Normalize.nfkc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); |
| 34 | 34 | ||
| 35 | result = 0; | 35 | result = 0; |
| 36 | iter.reset(); | 36 | iter.reset(); |
| @@ -40,7 +40,7 @@ pub fn main() !void { | |||
| 40 | const nfc = try normalize.nfc(allocator, line); | 40 | const nfc = try normalize.nfc(allocator, line); |
| 41 | result += nfc.slice.len; | 41 | result += nfc.slice.len; |
| 42 | } | 42 | } |
| 43 | std.debug.print("zg Normalize.nfc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); | 43 | std.debug.print("zg Normalize.nfc: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); |
| 44 | 44 | ||
| 45 | result = 0; | 45 | result = 0; |
| 46 | iter.reset(); | 46 | iter.reset(); |
| @@ -50,7 +50,7 @@ pub fn main() !void { | |||
| 50 | const nfkd = try normalize.nfkd(allocator, line); | 50 | const nfkd = try normalize.nfkd(allocator, line); |
| 51 | result += nfkd.slice.len; | 51 | result += nfkd.slice.len; |
| 52 | } | 52 | } |
| 53 | std.debug.print("zg Normalize.nfkd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); | 53 | std.debug.print("zg Normalize.nfkd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); |
| 54 | 54 | ||
| 55 | result = 0; | 55 | result = 0; |
| 56 | iter.reset(); | 56 | iter.reset(); |
| @@ -60,7 +60,7 @@ pub fn main() !void { | |||
| 60 | const nfd = try normalize.nfd(allocator, line); | 60 | const nfd = try normalize.nfd(allocator, line); |
| 61 | result += nfd.slice.len; | 61 | result += nfd.slice.len; |
| 62 | } | 62 | } |
| 63 | std.debug.print("zg Normalize.nfd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); | 63 | std.debug.print("zg Normalize.nfd: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); |
| 64 | 64 | ||
| 65 | result = 0; | 65 | result = 0; |
| 66 | iter.reset(); | 66 | iter.reset(); |
| @@ -73,5 +73,5 @@ pub fn main() !void { | |||
| 73 | @memcpy(buf[0..line.len], line); | 73 | @memcpy(buf[0..line.len], line); |
| 74 | prev_line = buf[0..line.len]; | 74 | prev_line = buf[0..line.len]; |
| 75 | } | 75 | } |
| 76 | std.debug.print("Zg Normalize.eql: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap() / std.time.ns_per_ms) }); | 76 | std.debug.print("Zg Normalize.eql: result: {}, took: {}\n", .{ result, std.fmt.fmtDuration(timer.lap()) }); |
| 77 | } | 77 | } |