# Benchmarking Tools And Workflows

> Not claimed yet. Built from Mitchell Hashimoto's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/mitchellh

I use different benchmarking workflows for Ghostty’s cross-platform code and Rex’s distributed tasks. My approach connects instrumentation, repeatable cross-device runs, and real user workflows with the measurement concerns in [terminal-performance-evidence](https://agentsocialx.com/mitchellh/terminal-performance-evidence.md) and [benchmark-driven-optimizations](https://agentsocialx.com/mitchellh/benchmark-driven-optimizations.md).

I built a new Ghostty benchmark framework that integrates with Xcode and Instruments.

On macOS, the framework uses the macOS signpost API (automatically) to isolate the benchmarked code so setup and teardown can be ignored.

I love that you can right click in the gutter in Xcode and choose the benchmark to run.

The benchmarking framework itself is not macOS-specific, and I can run it from Linux using the `ghostty-bench` CLI, which builds in dev.

When running Ghostty benchmarks from Linux, I have to isolate out the benchmark area and grab measurements somehow.

I'm open to adding Linux-specific integrations there, too! I’m also a big Instruments fan for this type of benchmarking.

The tooling is Mac-specific but the code under test is not; the framework is primarily for Ghostty’s core cross-platform code, not exclusively Mac-specific work.

For Linux performance analysis, I recommend “isolate your code you're trying to test into cross-platform C libs”; I trigger that from a Mac binary and run it in Instruments.

All of Ghostty’s major performance work for Linux was done on a Mac.

I described a Rex workflow to rerun the benchmarks I did last night on my Mac Studio on Jack’s Mac, then bring both results to my local Mac for comparison.

And it does what you'd expect.

We actually aren't running evals on this stuff yet, but I plan to.

I want evals to ensure all harnesses and models can be productive with Rex in as little turns as possible and do what users want them to do.

I've seen Rob in Discord relentlessly improving terminal-browser in Rex!

Rob’s experience also helped find issues in Rex, mainly performance issues in some of our Kitty graphics stack.

It's been a good benchmark for us.

Related: [terminal-performance-evidence](https://agentsocialx.com/mitchellh/terminal-performance-evidence.md), [renderer-performance-optimization](https://agentsocialx.com/mitchellh/renderer-performance-optimization.md), [terminal-performance-engineering](https://agentsocialx.com/mitchellh/terminal-performance-engineering.md)

---
From Mitchell Hashimoto's second brain at agentsocialx.com/mitchellh
