Important
Results tagged with vm or WSL2 are heavily distorted and do not accurately reflect the capabilities of the corresponding hardware.
| CPU | GHC 9.12.4 build | hedgehog-1.7-dependencies | hedgehog-1.7-build | containers-0.8-ghci |
|---|---|---|---|---|
| Intel Core Ultra 9 285K | 388s (6m28s) | 17s | 10s | 4s |
Intel Core Ultra 7 255H (-j8) |
428s (7m8s) | 23s | 11s | 4s |
Intel Core Ultra 7 255H (-j6) |
429s (7m9s) | 23s | 11s | 4s |
| Intel Core i9-10900K | 524s (8m44s) | 28s | 13s | 5s |
| Intel Core i9-10900K (vm) | 588s (9m48s) | 29s | 15s | 6s |
| AMD EPYC-Genoa (vm) | 661s (11m1s) | 27s | 21s | 7s |
| Intel Core i7-1165G7 | 715s (11m55s) | - | - | - |
| AMD Ryzen 5 5600X | 730s (12m10s) | 35s | 16s | 7s |
| AMD Ryzen 9 9900X3D (vm) | 754s (12m34s) | 33s | 15s | 5s |
| Intel Core i7-9700 (WSL2) | 924s (15m24s) | 49s | 23s | 7s |
| Intel Core Ultra 7 258V (WSL2) | 995s (16m35s) | 60s | 18s | 7s |
| Intel Core i5-3230M | 1879s (31m19s) | 112s (1m52s) | 33s | 12s |
| Intel Core 2 Duo P8700 | 3013s (50m13s) | - | - | - |
ghc-bench measures how well a system performs on Haskell development workloads compared to other systems.
It allows you to:
- benchmark a system
- submit benchmark results via GitHub issues
- compare benchmark results across systems
This can be used to:
- verify that a system delivers expected performance
- understand the impact of a hardware upgrade
- guide purchasing decisions
I'm interested in the following workloads:
- Building GHC
- Building a Cabal project
- Loading a project into
ghci
NOTE: If you are on Windows, you can run ghc-bench from a bootable USB drive (see next section).
Requirements:
cabalghc-9.12.4ghc-bench
If all of these are on your PATH you can benchmark your system with:
$ ghc-benchIf you want to know about other options or need detailed instructions then read on.
Advantage
- provides a consistent environment for benchmarking
- does not require network connectivity; results are submitted via a QR code
- based on
archiso(see the corresponding GiHub Actions workflow)
Steps
Download https://github.com/sol/ghc-bench/releases/download/live-iso-image/ghc-bench-live-latest-x86_64.iso and prepare a bootable USB drive.
After booting into the live environment:
- First use
--dry-runand make sure that you can submit results via the generated QR code:(make sure that the whole QR code fits on your screen and that you have a device that is capable of opening the corresponding URL)ghc-bench --qr --dry-run
- Run
ghc-benchghc-bench --qr
- Submit the result by scanning the generated QR code and opening the corresponding GitHub issue URL (if you are prompted to select an issue template, select "Benchmark result", this might happen if you are using the GitHub mobile app)
Install cabal, ghc-9.12.4, and ghc-bench:
$ ghcup install cabal
$ ghcup install ghc 9.12.4 --no-set
$ cabal update && cabal install -w ghc-9.12.4 ghc-benchRun ghc-bench:
$ ghc-benchInstall cabal and ghc-bench:
$ stack --resolver=nightly-2026-04-11 install cabal-install
$ cabal update && stack --resolver=nightly-2026-04-11 exec --no-ghc-package-path -- cabal install ghc-benchRun ghc-bench:
$ stack --resolver=nightly-2026-04-11 exec --no-ghc-package-path -- ghc-benchghc-bench never submits results on its own.
Upon completion, it generates a URL that pre-fills a GitHub issue.
To submit a benchmark result, follow these two steps:
- Open the generated URL
- Submit the GitHub issue
Benchmark results are then processed by a GitHub Action.
Running ghc-bench requires ~3.4G free space in /tmp/.
ghc-benchcreates a separate temporary directory for each benchmark run under/tmp/ghc-benchand always cleans up after itself.- The GHC 9.12.4 source tarball is stored at
~/.cache/ghc-bench/ghc-9.12.4-src.tar.gzand reused between benchmark runs. cabalis used to build Hadrian (the GHC build system)- any missing Hadrian dependencies are installed to
~/.local/state/cabal/store; apart from the GHC tarball, this is the only other situation where runningghc-benchmay modify anything outside of/tmp/ghc-bench
- any missing Hadrian dependencies are installed to
Exact steps performed by ghc-bench:
- Download the GHC 9.12.4 source tarball to
~/.cache/ghc-bench/ghc-9.12.4-src.tar.gz - Unpack GHC sources into a temporary directory under
/tmp/ghc-bench - Set the environment variable
GHCto the absolute path ofghc-9.12.4 - Run
./configure - Build Hadrian (not measured as part of the benchmark) by invoking
hadrian/build --helpto trigger dependency compilation - Run
hadrian/build -j$(nproc) --flavour=quickest
Auditing