alpha
Login
or
Join now
ptr.pet
/
ghostty
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
ghostty
/
src
/
benchmark
/
at
main
13 files
Mitchell Hashimoto
benchmark: isolate parser hot loop from code-layout shifts
3mo ago
bf3047b9
AGENTS.md
benchmark: isolate parser hot loop from code-layout shifts Extract the tight per-byte parsing loop from TerminalParser.step into a separate noinline function (parseAll). This eliminates a ~20% benchmark regression that appeared after the highway vendor changes despite zero changes to the parser source code. The root cause: the parser benchmark processes 50 MB of input through a byte-at-a-time DFA loop that is highly sensitive to instruction cache-line placement on Apple Silicon. The M-series cores fetch aligned 16-byte blocks; when the loop head lands near the end of a 64-byte cache line (offset 60), only one instruction fits in the first fetch versus four when aligned to offset 48. This causes ~29% more cycles for identical instruction counts. Previously the loop was inlined into the large step() function, so any code change anywhere in the binary (like the highway vendor restructuring) could shift the loop across a cache-line boundary. By making parseAll noinline, the loop gets its own function placement that is stable regardless of surrounding code changes.
3 months ago
Benchmark.zig
benchmark: disable test on windows We don't appear to have a time source with enough resolution to get a non-zero duration on the benchmark test so it fails.
4 months ago
CApi.zig
libghostty: export benchmark CLI API
1 year ago
CodepointWidth.zig
windows: avoid the use of wcwidth
5 months ago
GraphemeBreak.zig
Merge branch 'main' into grapheme-break
8 months ago
IsSymbol.zig
Remove unused imports
8 months ago
OscParser.zig
osc: remove inline from Parser.next
7 months ago
ScreenClone.zig
terminal: make stream processing infallible The terminal.Stream next/nextSlice functions can now no longer fail. All prior failure modes were fully isolated in the handler `vt` callbacks. As such, vt callbacks are now required to not return an error and handle their own errors somehow. Allowing streams to be fallible before was an incorrect design. It caused problematic scenarios like in `nextSlice` early terminating processing due to handler errors. This should not be possible. There is no safe way to bubble up vt errors through the stream because if nextSlice is called and multiple errors are returned, we can't coalesce them. We could modify that to return a partial result but its just more work for stream that is unnecessary. The handler can do all of this. This work was discovered due to cleanups to prepare for more C APIs. Less errors make C APIs easier to implement! And, it helps clean up our Zig, too.
5 months ago
TerminalParser.zig
benchmark: isolate parser hot loop from code-layout shifts Extract the tight per-byte parsing loop from TerminalParser.step into a separate noinline function (parseAll). This eliminates a ~20% benchmark regression that appeared after the highway vendor changes despite zero changes to the parser source code. The root cause: the parser benchmark processes 50 MB of input through a byte-at-a-time DFA loop that is highly sensitive to instruction cache-line placement on Apple Silicon. The M-series cores fetch aligned 16-byte blocks; when the loop head lands near the end of a 64-byte cache line (offset 60), only one instruction fits in the first fetch versus four when aligned to offset 48. This causes ~29% more cycles for identical instruction counts. Previously the loop was inlined into the large step() function, so any code change anywhere in the binary (like the highway vendor restructuring) could shift the loop across a cache-line boundary. By making parseAll noinline, the loop gets its own function placement that is stable regardless of surrounding code changes.
3 months ago
TerminalStream.zig
terminal: make stream processing infallible The terminal.Stream next/nextSlice functions can now no longer fail. All prior failure modes were fully isolated in the handler `vt` callbacks. As such, vt callbacks are now required to not return an error and handle their own errors somehow. Allowing streams to be fallible before was an incorrect design. It caused problematic scenarios like in `nextSlice` early terminating processing due to handler errors. This should not be possible. There is no safe way to bubble up vt errors through the stream because if nextSlice is called and multiple errors are returned, we can't coalesce them. We could modify that to return a partial result but its just more work for stream that is unnecessary. The handler can do all of this. This work was discovered due to cleanups to prepare for more C APIs. Less errors make C APIs easier to implement! And, it helps clean up our Zig, too.
5 months ago
cli.zig
benchmark: add option to microbenchmark OSC parser
8 months ago
main.zig
benchmark: screen clone
8 months ago
options.zig
Zig 0.15: zig build test
10 months ago