diff options
| author | Jacob Sandlund <jacob@jacobsandlund.com> | 2025-09-18 11:46:05 -0400 |
|---|---|---|
| committer | Jacob Sandlund <jacob@jacobsandlund.com> | 2025-09-18 11:46:05 -0400 |
| commit | 69594119c320920d7795214ef4cc4afa3699d3fa (patch) | |
| tree | 591d193a33f884a02b879e7ae3fafa06c06d3c3e /src/benchmark | |
| parent | 285a33fbc0cdbefd250fe6448e4c9b41e14ba7b9 (diff) | |
fix up diff from benchmarks, and add tests against ziglyph
Diffstat (limited to 'src/benchmark')
| -rw-r--r-- | src/benchmark/GraphemeBreak.zig | 2 | ||||
| -rw-r--r-- | src/benchmark/IsSymbol.zig | 9 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/benchmark/GraphemeBreak.zig b/src/benchmark/GraphemeBreak.zig index b3b169909..28de82593 100644 --- a/src/benchmark/GraphemeBreak.zig +++ b/src/benchmark/GraphemeBreak.zig @@ -21,7 +21,7 @@ data_f: ?std.fs.File = null, pub const Options = struct { /// The type of codepoint width calculation to use. - mode: Mode = .noop, + mode: Mode = .table, /// The data to read as a filepath. If this is "-" then /// we will read stdin. If this is unset, then we will diff --git a/src/benchmark/IsSymbol.zig b/src/benchmark/IsSymbol.zig index 0997da41d..09b61fceb 100644 --- a/src/benchmark/IsSymbol.zig +++ b/src/benchmark/IsSymbol.zig @@ -128,14 +128,7 @@ fn stepTable(ptr: *anyopaque) Benchmark.Error!void { const cp_, const consumed = d.next(c); assert(consumed); if (cp_) |cp| { - if (uucode.getX(.is_symbol, cp) != symbols.table.get(cp)) { - std.debug.panic("uucode and table disagree on codepoint {d}: uucode={}, table={}", .{ - cp, - uucode.getX(.is_symbol, cp), - symbols.table.get(cp), - }); - } - //std.mem.doNotOptimizeAway(symbols.table.get(cp)); + std.mem.doNotOptimizeAway(symbols.table.get(cp)); } } } |
