| CPU | building GHC 9.12.4 with --flavour=quickest |
|---|---|
| Intel Core Ultra 7 270K Plus | (no results yet) |
| Intel Core Ultra 7 255H | (no results yet) |
| Intel Core Ultra 7 258V | (no results yet) |
| Intel Core i9-10900K | 526s (8m 46s) |
| Intel Core i7-1165G7 | 715s (11m 55s) |
| Intel Core 2 Duo P8700 | 3013s (50m 13s) |
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
Requirements:
cabalghc-9.12.4ghc-bench
If all of these are on your PATH you can benchmark your system with:
$ ghc-benchIf you need detailed instructions for ghcup or stack then read on.
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 -- env --unset=GHC_PACKAGE_PATH cabal install ghc-benchRun ghc-bench:
$ stack --resolver=nightly-2026-04-11 exec -- env --unset=GHC_PACKAGE_PATH ghc-benchRunning 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
/tmp/ghc-bench/ghc-9.12.4-src.tar.gzand reused between benchmark runs (and users). cabalis used to build Hadrian (the GHC build system)- any missing Hadrian dependencies are installed to
~/.local/state/cabal/store; this is the only 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
/tmp/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