ghostty-org/ghostty

Create synthetic generator for `terminal.Style` and benchmark for hashing/equality

Opened this issue · 2 comments

We've found multiple times that the speed at which we can hash or check for equality for terminal.Style is a key part of the speed of terminal IO. It'd be useful to have a synthetic data generator (src/synthetic) and benchmarker (src/benchmark) for benchmarking this.

As part of this, we'll probably have to have a file encoding/decoding format for styles so the synthetic generator can write to a file and benchmark can read. Should be pretty minimal though.

this is assuredly not C, but the benchmark I used for #8489

simple_style_benchmark.zig.c

Thank you! That looks like it'd be pretty easy to extract into our synth/bench system, the hardest part would be the serialization in between.