aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/benchmark/TerminalParser.zig
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-07 18:29:21 +0300
commitdcfe11a7588fcd42471159453810abc9b7720a57 (patch)
treec32a77266028e73ca2382b96c96f8438a5fcd621 /vendor/libghostty-vt/src/benchmark/TerminalParser.zig
parent2dfed860103c4e4505ac7f25def9fe37da1e1e6a (diff)
build: update libghostty-vt vendor
vendor ghostty 063ac3e and remove the musl libc++ link workaround. expose the new selection formatter and hyperlink uri apis for follow-up rendering work. add manual artifact validation for static linux builds.
Diffstat (limited to 'vendor/libghostty-vt/src/benchmark/TerminalParser.zig')
-rw-r--r--vendor/libghostty-vt/src/benchmark/TerminalParser.zig16
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/libghostty-vt/src/benchmark/TerminalParser.zig b/vendor/libghostty-vt/src/benchmark/TerminalParser.zig
index e0008176..78c93312 100644
--- a/vendor/libghostty-vt/src/benchmark/TerminalParser.zig
+++ b/vendor/libghostty-vt/src/benchmark/TerminalParser.zig
@@ -88,11 +88,17 @@ fn step(ptr: *anyopaque) Benchmark.Error!void {
return error.BenchmarkFailed;
};
if (n == 0) break; // EOF reached
- for (buf[0..n]) |c| {
- const actions = p.next(c);
- //std.log.warn("actions={any}", .{actions});
- _ = actions;
- }
+ parseAll(&p, buf[0..n]);
+ }
+}
+
+/// Separated from `step` so that the tight per-byte loop gets its own
+/// function alignment, insulating it from code-layout changes elsewhere
+/// in the binary that would otherwise shift its cache-line placement.
+noinline fn parseAll(p: *terminalpkg.Parser, data: []const u8) void {
+ for (data) |c| {
+ const actions = p.next(c);
+ _ = actions;
}
}