aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-27 09:06:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-27 20:56:48 -0700
commitea7d8ec14752575a68733742be2ee7a583eea49e (patch)
tree0d46205cd1eecde8fa29f1729fe2ebf6d45f7392 /src/main.zig
parent11f894702b7c06b87f6e94eff719d9f83eaeeddf (diff)
downloadzig-ea7d8ec14752575a68733742be2ee7a583eea49e.tar.gz
zig-ea7d8ec14752575a68733742be2ee7a583eea49e.zip
std.Progress: smaller type for parents and robustify
Switch Node.Parent, Node.Index, and Node.OptionalIndex to be backed by u8 rather than u16. This works fine since we use 200 as the preallocated node buffer. This has the nice property that scanning the entire parents array for allocated nodes fits in 4 cache lines, even if we bumped the 200 up to 254 (leaving room for the two special states). The thread that reads progress updates from the pipe now handles short reads by ignoring messages that are sent in multiple reads. When checking the terminal size, if there is a failure, fall back to a conservative guess of 80x25 rather than panicking. A debug message is also emitted which would be displayed only in a debug build.
Diffstat (limited to 'src/main.zig')
0 files changed, 0 insertions, 0 deletions